Table of Contents

Class FormerlyKnownAsBinder

Namespace
Homa.Sdk.Foundation
Assembly
Homa.Sdk.Foundation.dll

Allows deserialization of types that were renamed or moved to another namespaces if the resolution for the provided Newtonsoft.Json.Serialization.ISerializationBinder fails.

public sealed class FormerlyKnownAsBinder : ISerializationBinder
Inheritance
FormerlyKnownAsBinder
Implements
ISerializationBinder
Inherited Members

Remarks

This binder will look for classes that have FormerlyKnownAsAttribute with the name that the given inner ISerializationBinder uses. If the binder saved the type information as name "Foo" in assembly "Bar", this binder will look for types that are formerly known as "Foo", independently of what was the actual type serialized.

Constructors

FormerlyKnownAsBinder()

public FormerlyKnownAsBinder()

FormerlyKnownAsBinder(ISerializationBinder)

public FormerlyKnownAsBinder(ISerializationBinder innerSerializationBinder)

Parameters

innerSerializationBinder ISerializationBinder

Methods

BindToName(Type, out string, out string)

When implemented, controls the binding of a serialized object to a type.

public void BindToName(Type serializedType, out string assemblyName, out string typeName)

Parameters

serializedType Type

The type of the object the formatter creates a new instance of.

assemblyName string

Specifies the Assembly name of the serialized object.

typeName string

Specifies the Type name of the serialized object.

BindToType(string, string)

When implemented, controls the binding of a serialized object to a type.

public Type BindToType(string assemblyName, string typeName)

Parameters

assemblyName string

Specifies the Assembly name of the serialized object.

typeName string

Specifies the Type name of the serialized object

Returns

Type

The type of the object the formatter creates a new instance of.