共用方式為


GlobalObjectService.GetGlobalTypes Method

Returns a collection of currently available global types.

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

Syntax

'Declaration
Public Function GetGlobalTypes As GlobalTypeCollection
public GlobalTypeCollection GetGlobalTypes()
public:
GlobalTypeCollection^ GetGlobalTypes()
member GetGlobalTypes : unit -> GlobalTypeCollection
public function GetGlobalTypes() : GlobalTypeCollection

Return Value

Type: Microsoft.VisualStudio.Shell.Design.GlobalTypeCollection
A GlobalTypeCollection containing the currently available global types.

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 GetGlobalTypes method returns a GlobalTypeCollection of the currently available GlobalType 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.

GetGlobalTypes never returns nulla null reference (Nothing in Visual Basic); if there are no currently available global types, this method returns an empty collection.

.NET Framework Security

See Also

Reference

GlobalObjectService Class

Microsoft.VisualStudio.Shell.Design Namespace

GetGlobalObjects

GlobalType

GlobalTypeCollection