CodeDomSerializerBase.GetSerializer Method (IDesignerSerializationManager, Object)
Locates a serializer for the given object value.
Assembly: System.Design (in System.Design.dll)
protected CodeDomSerializer GetSerializer( IDesignerSerializationManager manager, Object value )
- Type: System.ComponentModel.Design.Serialization.IDesignerSerializationManager
The IDesignerSerializationManager to use for serialization.
- Type: System.Object
The object specifying the serializer to retrieve.
Return ValueType: System.ComponentModel.Design.Serialization.CodeDomSerializer
A CodeDomSerializer that is appropriate for value.
The GetSerializer method is an extension to the IDesignerSerializationManager.GetSerializer method. The IDesignerSerializationManager.GetSerializer method takes an object type, rather than an object value. If an external party had overridden metadata for a specific object through TypeDescriptor, that metadata override would not be seen by the IDesignerSerializationManager.GetSerializer method, which only takes a type. The GetSerializer method checks the metadata of the value and the value’s type. If the two differ, GetSerializer will look to see if there is a custom designer serializer attribute on the value. If so, GetSerializer will attempt to use it. Otherwise, it will defer to IDesignerSerializationManager.GetSerializer.
- 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.
Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.