Table of Contents

Class JsonConverterExtensions

Namespace
Savvyio.Extensions.Newtonsoft.Json
Assembly
Savvyio.Extensions.Newtonsoft.Json.dll

Extension methods for the Newtonsoft.Json.JsonConverter class.

public static class JsonConverterExtensions
Inheritance
JsonConverterExtensions

Methods

AddAggregateRootConverter<TKey>(ICollection<JsonConverter>, Action<ActivatorOptions>)

Adds a AggregateRoot<TKey> converter to the collection.

public static ICollection<JsonConverter> AddAggregateRootConverter<TKey>(this ICollection<JsonConverter> converters, Action<ActivatorOptions> setup = null)

Parameters

converters ICollection<JsonConverter>

The collection to extend.

setup Action<ActivatorOptions>

The ActivatorOptions which may be configured.

Returns

ICollection<JsonConverter>

A reference to converters so that additional calls can be chained.

Type Parameters

TKey

Exceptions

ArgumentNullException

converters cannot be null.

AddMessageConverter(ICollection<JsonConverter>)

Adds an IMessage<T>/ISignedMessage<T> converter to the collection.

public static ICollection<JsonConverter> AddMessageConverter(this ICollection<JsonConverter> converters)

Parameters

converters ICollection<JsonConverter>

The collection to extend.

Returns

ICollection<JsonConverter>

A reference to converters so that additional calls can be chained.

Exceptions

ArgumentNullException

converters cannot be null.

AddMetadataDictionaryConverter(ICollection<JsonConverter>)

Adds a IMetadataDictionary converter to the collection.

public static ICollection<JsonConverter> AddMetadataDictionaryConverter(this ICollection<JsonConverter> converters)

Parameters

converters ICollection<JsonConverter>

The collection to extend.

Returns

ICollection<JsonConverter>

A reference to converters so that additional calls can be chained.

Exceptions

ArgumentNullException

converters cannot be null.

AddRequestConverter(ICollection<JsonConverter>)

Adds an IRequest converter to the collection.

public static ICollection<JsonConverter> AddRequestConverter(this ICollection<JsonConverter> converters)

Parameters

converters ICollection<JsonConverter>

The collection to extend.

Returns

ICollection<JsonConverter>

A reference to converters so that additional calls can be chained.

Exceptions

ArgumentNullException

converters cannot be null.

AddSingleValueObjectConverter(ICollection<JsonConverter>)

Adds a SingleValueObject<T> converter to the collection.

public static ICollection<JsonConverter> AddSingleValueObjectConverter(this ICollection<JsonConverter> converters)

Parameters

converters ICollection<JsonConverter>

The collection to extend.

Returns

ICollection<JsonConverter>

A reference to converters so that additional calls can be chained.

Exceptions

ArgumentNullException

converters cannot be null.

AddValueObjectConverter(ICollection<JsonConverter>, Action<ActivatorOptions>)

Adds a ValueObject converter to the collection.

public static ICollection<JsonConverter> AddValueObjectConverter(this ICollection<JsonConverter> converters, Action<ActivatorOptions> setup = null)

Parameters

converters ICollection<JsonConverter>

The collection to extend.

setup Action<ActivatorOptions>

The ActivatorOptions which may be configured.

Returns

ICollection<JsonConverter>

A reference to converters so that additional calls can be chained.

Exceptions

ArgumentNullException

converters cannot be null.