GlobalObjectProvider::GetGlobalObjectsCore Method (Project^, Type^)

 

When overridden in a derived class, returns a collection of global objects for the specified project that match the specified type.

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

protected:
virtual GlobalObjectCollection^ GetGlobalObjectsCore(
	Project^ project,
	Type^ baseType
) abstract

Parameters

project
Type: EnvDTE::Project^

The Project to obtain global objects from.

baseType
Type: System::Type^

The Type of the GlobalObject to filter on. Can be null to indicate no filtering.

Return Value

Type: Microsoft.VisualStudio.Shell.Design::GlobalObjectCollection^

A GlobalObjectCollection containing the global objects of the specified Type for the specified project.

The GetGlobalObjectsCore method is the internal worker method that the GetGlobalObjects wrapper methods refer calls to. It is an abstract method that derived classes must implement.

GetGlobalObjectsCore should always return the same instance of the GlobalObject as long as the global object type has not dynamically changed. To indicate the absence of any global objects meeting the specified criteria, this method must return an empty collection; it should never return null or a collection with a null element.

GetGlobalObjectsCore should return a collection that represents a union of the following items:

  • Any custom class defined in the project.

  • The return value from any static property or method on that class.

Return to top
Show: