Table of Contents

Class Serializer

Namespace
Shift.Common.Json
Assembly
Shift.Common.dll
public class Serializer : IJsonSerializer
Inheritance
Serializer
Implements
Inherited Members
Extension Methods

Constructors

Serializer()

public Serializer()

Methods

Deserialize<T>(string)

Returns a object deserialized from the input string.

public T Deserialize<T>(string value)

Parameters

value string

Returns

T

Type Parameters

T

Deserialize<T>(string, Type, bool)

Returns a object of the desired type, deserialized from the input string.

public T Deserialize<T>(string value, Type type, bool ignoreAttributes)

Parameters

value string
type Type
ignoreAttributes bool

Returns

T

Type Parameters

T

GetClassName(Type)

Returns the assembly-qualified class name without the version, culture, and public key token.

public string GetClassName(Type type)

Parameters

type Type

Returns

string

Serialize(object, string[], bool)

Exclude the aggregate identifier/version and the event time/user from the serialized event. These properties are stored in their own discrete columns in the Command table, so we don't need them duplicated in the CommandData column.

public string Serialize(object command, string[] exclusions, bool ignoreAttributes)

Parameters

command object
exclusions string[]
ignoreAttributes bool

Returns

string

SerializeChange(IChange)

Exclude the aggregate identifier/version and the event time/user from the serialized event. These properties are stored in their own discrete columns in the Command table, so we don't need them duplicated in the CommandData column.

public string SerializeChange(IChange command)

Parameters

command IChange

Returns

string

SerializeCommand(ICommand)

Exclude the aggregate identifier/version and the event time/user from the serialized event. These properties are stored in their own discrete columns in the Command table, so we don't need them duplicated in the CommandData column.

public string SerializeCommand(ICommand command)

Parameters

command ICommand

Returns

string

Serialize<T>(T)

Returns the serialized string value for an object of a specific type.

public string Serialize<T>(T value)

Parameters

value T

Returns

string

Type Parameters

T