Share via


GlobalObjectProvider.GetGlobalObjectsCore Method

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)

Syntax

'Declaration
Protected MustOverride Function GetGlobalObjectsCore ( _
    project As Project, _
    baseType As Type _
) As GlobalObjectCollection
protected abstract GlobalObjectCollection GetGlobalObjectsCore(
    Project project,
    Type baseType
)
protected:
virtual GlobalObjectCollection^ GetGlobalObjectsCore(
    Project^ project, 
    Type^ baseType
) abstract
abstract GetGlobalObjectsCore : 
        project:Project * 
        baseType:Type -> GlobalObjectCollection
protected abstract function GetGlobalObjectsCore(
    project : Project, 
    baseType : Type
) : GlobalObjectCollection

Parameters

  • baseType
    Type: System.Type

    The Type of the GlobalObject to filter on. Can be nulla null reference (Nothing in Visual Basic) 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.

Remarks

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 nulla null reference (Nothing in Visual Basic) or a collection with a nulla null reference (Nothing in Visual Basic) 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.

.NET Framework Security

See Also

Reference

GlobalObjectProvider Class

Microsoft.VisualStudio.Shell.Design Namespace

GetGlobalTypesCore

GetGlobalObjects

GetGlobalTypes

GlobalObjectCollection

GlobalObject