Export (0) Print
Expand All

CodeDomSerializerBase.GetSerializer Method (IDesignerSerializationManager, Object)

Locates a serializer for the given object value.

Namespace:  System.ComponentModel.Design.Serialization
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.


manager or value is null.

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.

.NET Framework

Supported in: 4.5, 4, 3.5, 3.0, 2.0

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.

© 2014 Microsoft