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
'宣言
Protected MustOverride Function GetGlobalObjectsCore ( _
project As Project, _
baseType As Type _
) As GlobalObjectCollection
protected abstract GlobalObjectCollection GetGlobalObjectsCore(
Project project,
Type baseType
)
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 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
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.