GlobalObject::Instance Property
Visual Studio 2015
Gets an on-demand created instance of the global object.
Assembly: Microsoft.VisualStudio.Shell.Design (in Microsoft.VisualStudio.Shell.Design.dll)
| Exception | Condition |
|---|---|
| InvalidOperationException | The resulting instance is not serializable, which indicates an incorrect implementation. |
You can use the Instance property to create an actual instance of the global object represented by the current global object. This property is null if the global objects contains only static members.
A new instance is only created the first time this property is retrieved. Subsequent retrievals get the same object unless one or more of the PerformChange, PerformRemove or ClearInstance methods are called in the intervening period.
If a new instance is created that is not null, then a Created event is raised.
Show: