Поделиться через


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

'Декларация
Public Sub New ( _
    provider As IServiceProvider, _
    project As Project, _
    serializerType As Type _
)
'Применение
Dim provider As IServiceProvider
Dim project As Project
Dim serializerType As Type

Dim instance As New GlobalObjectService(provider, _
    project, serializerType)
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

  • serializerType
    Type: System.Type
    The 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

See Also

Reference

GlobalObjectService Class

GlobalObjectService Members

Microsoft.VisualStudio.Shell.Design Namespace

CodeDomDesignerLoader