SolutionEvents Interface
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Provides events for changes to a solution. Use this object for functionality and refer to SolutionEventsClass for this object's documentation.
public interface class SolutionEvents : EnvDTE::_dispSolutionEvents_Event, EnvDTE::_SolutionEvents
public interface class SolutionEvents : EnvDTE::_dispSolutionEvents_Event
public interface class SolutionEvents : EnvDTE::_dispSolutionEvents_Event, EnvDTE::_SolutionEvents
__interface SolutionEvents : EnvDTE::_dispSolutionEvents_Event, EnvDTE::_SolutionEvents
[System.Runtime.InteropServices.CoClass(typeof(EnvDTE.SolutionEventsClass))]
[System.Runtime.InteropServices.Guid("BF8BBF37-5415-46A9-940D-594CAD9DEC26")]
public interface SolutionEvents : EnvDTE._dispSolutionEvents_Event, EnvDTE._SolutionEvents
[System.Runtime.InteropServices.CoClass(typeof(EnvDTE.SolutionEventsClass))]
[System.Runtime.InteropServices.Guid("BF8BBF37-5415-46A9-940D-594CAD9DEC26")]
[System.Runtime.InteropServices.ComVisible(false)]
public interface SolutionEvents : EnvDTE._dispSolutionEvents_Event
[<System.Runtime.InteropServices.CoClass(typeof(EnvDTE.SolutionEventsClass))>]
[<System.Runtime.InteropServices.Guid("BF8BBF37-5415-46A9-940D-594CAD9DEC26")>]
type SolutionEvents = interface
interface _SolutionEvents
interface _dispSolutionEvents_Event
[<System.Runtime.InteropServices.CoClass(typeof(EnvDTE.SolutionEventsClass))>]
[<System.Runtime.InteropServices.Guid("BF8BBF37-5415-46A9-940D-594CAD9DEC26")>]
[<System.Runtime.InteropServices.ComVisible(false)>]
type SolutionEvents = interface
interface _dispSolutionEvents_Event
Public Interface SolutionEvents
Implements _dispSolutionEvents_Event, _SolutionEvents
Public Interface SolutionEvents
Implements _dispSolutionEvents_Event
- Derived
- Attributes
- Implements
Examples
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");
}
}
Remarks
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.
Methods
Events
AfterClosing |
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) |
BeforeClosing |
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) |
Opened |
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) |
ProjectAdded |
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) |
ProjectRemoved |
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) |
ProjectRenamed |
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) |
QueryCloseSolution |
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) |
Renamed |
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) |