SolutionEvents Interface

 

Provides events for changes to a solution. Use this object for functionality and refer to SolutionEventsClass for this object's documentation.

Namespace:   EnvDTE
Assembly:  EnvDTE (in EnvDTE.dll)

[GuidAttribute("BF8BBF37-5415-46A9-940D-594CAD9DEC26")]
public interface SolutionEvents : _SolutionEvents, _dispSolutionEvents_Event

NameDescription
System_CAPS_pubmethodadd_AfterClosing(_dispSolutionEvents_AfterClosingEventHandler)

This API supports the product infrastructure and is not intended to be used directly from your code. Microsoft Internal Use Only.(Inherited from _dispSolutionEvents_Event.)

System_CAPS_pubmethodadd_BeforeClosing(_dispSolutionEvents_BeforeClosingEventHandler)

This API supports the product infrastructure and is not intended to be used directly from your code. Microsoft Internal Use Only.(Inherited from _dispSolutionEvents_Event.)

System_CAPS_pubmethodadd_Opened(_dispSolutionEvents_OpenedEventHandler)

This API supports the product infrastructure and is not intended to be used directly from your code. Microsoft Internal Use Only.(Inherited from _dispSolutionEvents_Event.)

System_CAPS_pubmethodadd_ProjectAdded(_dispSolutionEvents_ProjectAddedEventHandler)

This API supports the product infrastructure and is not intended to be used directly from your code. Microsoft Internal Use Only.(Inherited from _dispSolutionEvents_Event.)

System_CAPS_pubmethodadd_ProjectRemoved(_dispSolutionEvents_ProjectRemovedEventHandler)

This API supports the product infrastructure and is not intended to be used directly from your code. Microsoft Internal Use Only.(Inherited from _dispSolutionEvents_Event.)

System_CAPS_pubmethodadd_ProjectRenamed(_dispSolutionEvents_ProjectRenamedEventHandler)

This API supports the product infrastructure and is not intended to be used directly from your code. Microsoft Internal Use Only.(Inherited from _dispSolutionEvents_Event.)

System_CAPS_pubmethodadd_QueryCloseSolution(_dispSolutionEvents_QueryCloseSolutionEventHandler)

This API supports the product infrastructure and is not intended to be used directly from your code. Microsoft Internal Use Only.(Inherited from _dispSolutionEvents_Event.)

System_CAPS_pubmethodadd_Renamed(_dispSolutionEvents_RenamedEventHandler)

This API supports the product infrastructure and is not intended to be used directly from your code. Microsoft Internal Use Only.(Inherited from _dispSolutionEvents_Event.)

System_CAPS_pubmethodremove_AfterClosing(_dispSolutionEvents_AfterClosingEventHandler)

This API supports the product infrastructure and is not intended to be used directly from your code. Microsoft Internal Use Only.(Inherited from _dispSolutionEvents_Event.)

System_CAPS_pubmethodremove_BeforeClosing(_dispSolutionEvents_BeforeClosingEventHandler)

This API supports the product infrastructure and is not intended to be used directly from your code. Microsoft Internal Use Only.(Inherited from _dispSolutionEvents_Event.)

System_CAPS_pubmethodremove_Opened(_dispSolutionEvents_OpenedEventHandler)

This API supports the product infrastructure and is not intended to be used directly from your code. Microsoft Internal Use Only.(Inherited from _dispSolutionEvents_Event.)

System_CAPS_pubmethodremove_ProjectAdded(_dispSolutionEvents_ProjectAddedEventHandler)

This API supports the product infrastructure and is not intended to be used directly from your code. Microsoft Internal Use Only.(Inherited from _dispSolutionEvents_Event.)

System_CAPS_pubmethodremove_ProjectRemoved(_dispSolutionEvents_ProjectRemovedEventHandler)

This API supports the product infrastructure and is not intended to be used directly from your code. Microsoft Internal Use Only.(Inherited from _dispSolutionEvents_Event.)

System_CAPS_pubmethodremove_ProjectRenamed(_dispSolutionEvents_ProjectRenamedEventHandler)

This API supports the product infrastructure and is not intended to be used directly from your code. Microsoft Internal Use Only.(Inherited from _dispSolutionEvents_Event.)

System_CAPS_pubmethodremove_QueryCloseSolution(_dispSolutionEvents_QueryCloseSolutionEventHandler)

This API supports the product infrastructure and is not intended to be used directly from your code. Microsoft Internal Use Only.(Inherited from _dispSolutionEvents_Event.)

System_CAPS_pubmethodremove_Renamed(_dispSolutionEvents_RenamedEventHandler)

This API supports the product infrastructure and is not intended to be used directly from your code. Microsoft Internal Use Only.(Inherited from _dispSolutionEvents_Event.)

NameDescription
System_CAPS_pubeventAfterClosing

This API supports the product infrastructure and is not intended to be used directly from your code. Microsoft Internal Use Only.(Inherited from _dispSolutionEvents_Event.)

System_CAPS_pubeventBeforeClosing

This API supports the product infrastructure and is not intended to be used directly from your code. Microsoft Internal Use Only.(Inherited from _dispSolutionEvents_Event.)

System_CAPS_pubeventOpened

This API supports the product infrastructure and is not intended to be used directly from your code. Microsoft Internal Use Only.(Inherited from _dispSolutionEvents_Event.)

System_CAPS_pubeventProjectAdded

This API supports the product infrastructure and is not intended to be used directly from your code. Microsoft Internal Use Only.(Inherited from _dispSolutionEvents_Event.)

System_CAPS_pubeventProjectRemoved

This API supports the product infrastructure and is not intended to be used directly from your code. Microsoft Internal Use Only.(Inherited from _dispSolutionEvents_Event.)

System_CAPS_pubeventProjectRenamed

This API supports the product infrastructure and is not intended to be used directly from your code. Microsoft Internal Use Only.(Inherited from _dispSolutionEvents_Event.)

System_CAPS_pubeventQueryCloseSolution

This API supports the product infrastructure and is not intended to be used directly from your code. Microsoft Internal Use Only.(Inherited from _dispSolutionEvents_Event.)

System_CAPS_pubeventRenamed

This API supports the product infrastructure and is not intended to be used directly from your code. Microsoft Internal Use Only.(Inherited from _dispSolutionEvents_Event.)

The SolutionEvents object can go out of scope and be garbage collected before the solution is closed. To retain a reference to this object, declare a private variable in the class in which you implement the solution event handlers.

public class MyClass : IDTExtensibility2
{
    private SolutionEvents _solnEvents;

    private void MenuItemCallback(object sender, EventArgs e)
    {
        _solnEvents = dte.Events.SolutionEvents;

        _solutionBeforeClosingEventHandler = new _dispSolutionEvents_BeforeClosingEventHandler(this.SolutionBeforeClosing);
        _solnEvents.BeforeClosing += _solutionBeforeClosingEventHandler;
    }

    private _dispSolutionEvents_BeforeClosingEventHandler _solutionBeforeClosingEventHandler

    private void SolutionBeforeClosing()
    {
        System.Windows.Forms.MessageBox.Show("SolutionBeforeClosing");
    }
}
Return to top
Show: