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


GlobalObject.GetSerializer Method

Returns the checked serializer of the specified type for the global object.

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

Syntax

'Декларация
Public Function GetSerializer ( _
    serializerType As Type _
) As Object
'Применение
Dim instance As GlobalObject
Dim serializerType As Type
Dim returnValue As Object

returnValue = instance.GetSerializer(serializerType)
public Object GetSerializer(
    Type serializerType
)
public:
Object^ GetSerializer(
    Type^ serializerType
)
member GetSerializer : 
        serializerType:Type -> Object 
public function GetSerializer(
    serializerType : Type
) : Object

Parameters

  • serializerType
    Type: System.Type
    The type of serializer to retrieve.

Return Value

Type: System.Object
A serializer of the specified type if supported; otherwise, nulla null reference (Nothing in Visual Basic).

Exceptions

Exception Condition
ArgumentNullException

serializerType is nulla null reference (Nothing in Visual Basic).

InvalidOperationException

The non-nulla null reference (Nothing in Visual Basic) serializer retrieved is itself not serializable.

Remarks

The GetSerializer method safely wraps a call to the GetSerializerCore method, checking the parameter and the return value. GetSerializer ensures that the returned serializer must itself be serializable so that it is capable of marshaling across domain boundaries if required.

.NET Framework Security

See Also

Reference

GlobalObject Class

GlobalObject Members

Microsoft.VisualStudio.Shell.Design Namespace

GetSerializerCore