GlobalObjectService Constructor (IServiceProvider^, Project^, Type^)

 

Initializes an new instance of the GlobalObjectService class

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

public:
GlobalObjectService(
	IServiceProvider^ provider,
	Project^ project,
	Type^ serializerType
)

Parameters

provider
Type: System::IServiceProvider^

The IServiceProvider that will be used to obtain other services.

project
Type: EnvDTE::Project^

The Project associated with this global object service.

serializerType
Type: System::Type^

The serializer Type supported by the current designer loader.

Exception Condition
ArgumentNullException

One or more of the parameters is null.

Design-time tools do not typically create instances of the GlobalObjectService class. Instead, when the designer loader is initialized, it creates a single instance of the global object service which it associates with the design surface.

The project parameter is required because global objects are really only global to a project. The serializerType parameter is passed to the global object provider service to enumerate providers that can offer the specified serializer. This enables the global object service to only offer global objects that can be serialized using the current designer loader’s serialization mechanism.

This class cannot be overridden.

Return to top
Show: