Version 3.3.1.2

TwoWaySerializationBinder class

Namespace: Sirenix.Serialization
Assembly: Sirenix.Serialization
public abstract class TwoWaySerializationBinder
Binds types to strings during serialization, and strings to types during deserialization.
Inheritance
  • System.Object
  • TwoWaySerializationBinder

Constructors

TwoWaySerializationBinder()
protected TwoWaySerializationBinder()

Fields

Default
Provides a default, catch-all TwoWaySerializationBinder implementation. This binder only includes assembly names, without versions and tokens, in order to increase compatibility.
public static readonly TwoWaySerializationBinder Default

Methods

BindToName(Type, DebugContext)
Bind a type to a name.
public abstract string BindToName(Type type, DebugContext debugContext = null)
Parameters
System.Type type

The type to bind.

DebugContext debugContext

The debug context to log to.

Returns
System.String

The name that the type has been bound to.

BindToType(String, DebugContext)
Binds a name to a type.
public abstract Type BindToType(string typeName, DebugContext debugContext = null)
Parameters
System.String typeName

The name of the type to bind.

DebugContext debugContext

The debug context to log to.

Returns
System.Type

The type that the name has been bound to, or null if the type could not be resolved.

ContainsType(String)
Determines whether the specified type name is mapped.
public abstract bool ContainsType(string typeName)
Parameters
System.String typeName

Returns
System.Boolean

Derived Classes