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
'Declaration
Public Function GetSerializer ( _
serializerType As Type _
) As Object
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.TypeThe 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
- 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.