GlobalObjectService Constructor
Initializes an new instance of the GlobalObjectService class
Namespace: Microsoft.VisualStudio.Shell.Design
Assembly: Microsoft.VisualStudio.Shell.Design (in Microsoft.VisualStudio.Shell.Design.dll)
Syntax
'Declaration
Public Sub New ( _
provider As IServiceProvider, _
project As Project, _
serializerType As Type _
)
public GlobalObjectService(
IServiceProvider provider,
Project project,
Type serializerType
)
public:
GlobalObjectService(
IServiceProvider^ provider,
Project^ project,
Type^ serializerType
)
new :
provider:IServiceProvider *
project:Project *
serializerType:Type -> GlobalObjectService
public function GlobalObjectService(
provider : IServiceProvider,
project : Project,
serializerType : Type
)
Parameters
provider
Type: System.IServiceProviderThe IServiceProvider that will be used to obtain other services.
project
Type: EnvDTE.ProjectThe Project associated with this global object service.
serializerType
Type: System.TypeThe serializer Type supported by the current designer loader.
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | One or more of the parameters is nulla null reference (Nothing in Visual Basic). |
Remarks
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.
.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.