Compartilhar via


IVsSolutionEvents3 Interface

Definition

Listening interface that monitors any notifications of changes to the solution.

public interface class IVsSolutionEvents3 : Microsoft::VisualStudio::Shell::Interop::IVsSolutionEvents2
public interface class IVsSolutionEvents3 : Microsoft::VisualStudio::Shell::Interop::IVsSolutionEvents2
__interface IVsSolutionEvents3 : Microsoft::VisualStudio::Shell::Interop::IVsSolutionEvents2
[System.Runtime.InteropServices.Guid("F1DE2D75-3B95-4510-9B2B-565BC0E38877")]
[System.Runtime.InteropServices.InterfaceType(1)]
public interface IVsSolutionEvents3 : Microsoft.VisualStudio.Shell.Interop.IVsSolutionEvents2
[System.Runtime.InteropServices.Guid("F1DE2D75-3B95-4510-9B2B-565BC0E38877")]
[System.Runtime.InteropServices.InterfaceType(System.Runtime.InteropServices.ComInterfaceType.InterfaceIsIUnknown)]
public interface IVsSolutionEvents3 : Microsoft.VisualStudio.Shell.Interop.IVsSolutionEvents2
[<System.Runtime.InteropServices.Guid("F1DE2D75-3B95-4510-9B2B-565BC0E38877")>]
[<System.Runtime.InteropServices.InterfaceType(1)>]
type IVsSolutionEvents3 = interface
    interface IVsSolutionEvents2
[<System.Runtime.InteropServices.Guid("F1DE2D75-3B95-4510-9B2B-565BC0E38877")>]
[<System.Runtime.InteropServices.InterfaceType(System.Runtime.InteropServices.ComInterfaceType.InterfaceIsIUnknown)>]
type IVsSolutionEvents3 = interface
    interface IVsSolutionEvents2
    interface IVsSolutionEvents
Public Interface IVsSolutionEvents3
Implements IVsSolutionEvents2
Derived
Attributes
Implements

Remarks

This interface is implemented to track the opening, closing, loading, and unloading of a solution or project of a solution. There are fundamental differences between opening and closing and loading and unloading solutions or projects. For example, when a project is added to the solution, it is both "open" and "loaded" and it is available for all users to access. However, a user can "unload" the project, which then removes it from the solution only for that user. Another user can open the same solution and have that project "loaded." In other words, loading and unloading are user-specific and unloading a project does not remove it from the solution.

If the project cited in this example is "closed" by a user, then that project is effectively removed from the solution altogether, rendering it unavailable to subsequent users of the solution. This same example can be applied at the solution level.

IVsSolutionEvents3 contains methods that are implemented by parent projects containing children (nested) projects. It is implemented in conjunction with IVsParentProject.

You can also query SVsSolution for IVsSolution, Then call AdviseSolutionEvents to get a pointer to IVsSolutionEvents3 if you have a project that needs to listen to solution events.

Notes to Implementers

VSPackages implement this interface to receive notification of events affecting solution status.

Methods

OnAfterCloseSolution(Object)

Notifies listening clients that a solution has been closed.

OnAfterClosingChildren(IVsHierarchy)

Fired after closing all nested projects owned by a parent hierarchy.

OnAfterLoadProject(IVsHierarchy, IVsHierarchy)

Notifies listening clients that the project has been loaded.

OnAfterMergeSolution(Object)

Notifies listening clients that all projects have been merged into the open solution.

OnAfterOpeningChildren(IVsHierarchy)

Fired after opening all nested projects owned by a parent hierarchy.

OnAfterOpenProject(IVsHierarchy, Int32)

Notifies listening clients that the project has been opened.

OnAfterOpenSolution(Object, Int32)

Notifies listening clients that the solution has been opened.

OnBeforeCloseProject(IVsHierarchy, Int32)

Notifies listening clients that the project is about to be closed.

OnBeforeCloseSolution(Object)

Notifies listening clients that the solution is about to be closed.

OnBeforeClosingChildren(IVsHierarchy)

Fired before closing all nested projects owned by a parent hierarchy.

OnBeforeOpeningChildren(IVsHierarchy)

Fired before opening all nested projects owned by a parent hierarchy.

OnBeforeUnloadProject(IVsHierarchy, IVsHierarchy)

Notifies listening clients that the project is about to be unloaded.

OnQueryCloseProject(IVsHierarchy, Int32, Int32)

Queries listening clients as to whether the project can be closed.

OnQueryCloseSolution(Object, Int32)

Queries listening clients as to whether the solution can be closed.

OnQueryUnloadProject(IVsHierarchy, Int32)

Queries listening clients as to whether the project can be unloaded.

Applies to