次の方法で共有


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
public Object GetSerializer(
    Type serializerType
)

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

Microsoft.VisualStudio.Shell.Design Namespace

GetSerializerCore