Compartir a través de


GlobalObjectService.GetGlobalObjects Method

Returns a collection of all the currently available global objects.

Namespace:  Microsoft.VisualStudio.Shell.Design
Assembly:  Microsoft.VisualStudio.Shell.Design (in Microsoft.VisualStudio.Shell.Design.dll)

Syntax

'Declaración
Public Function GetGlobalObjects As GlobalObjectCollection
'Uso
Dim instance As GlobalObjectService
Dim returnValue As GlobalObjectCollection

returnValue = instance.GetGlobalObjects()
public GlobalObjectCollection GetGlobalObjects()
public:
GlobalObjectCollection^ GetGlobalObjects()
member GetGlobalObjects : unit -> GlobalObjectCollection 
public function GetGlobalObjects() : GlobalObjectCollection

Return Value

Type: Microsoft.VisualStudio.Shell.Design.GlobalObjectCollection
A GlobalObjectCollection containing the currently available global objects.

Exceptions

Exception Condition
NotSupportedException

One of the queried global service provider factories returned nulla null reference (Nothing in Visual Basic) provider or provider collection.

Remarks

The GetGlobalObjects method returns a GlobalObjectCollection of all the currently available instances of the GlobalObject class. This collection is created each time this method is called. When the method is called, the method synchronizes the collection with the set of global object providers.

GetGlobalObjects never returns nulla null reference (Nothing in Visual Basic); if there are no currently available global objects, this method returns an empty collection. This version of the method is equivalent to the call GetGlobalObjects(null).

.NET Framework Security

See Also

Reference

GlobalObjectService Class

GlobalObjectService Members

GetGlobalObjects Overload

Microsoft.VisualStudio.Shell.Design Namespace

GetGlobalTypes

GlobalObject

GlobalObjectCollection