Table of Contents

Class ServiceCollectionExtensions

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

Extension methods for the IServiceCollection interface.

public static class ServiceCollectionExtensions
Inheritance
ServiceCollectionExtensions

Methods

AddNewtonsoftJsonMarshaller(IServiceCollection, Action<NewtonsoftJsonFormatterOptions>, Action<ServiceOptions>)

Adds an NewtonsoftJsonMarshaller implementation to the specified IServiceCollection.

public static IServiceCollection AddNewtonsoftJsonMarshaller(this IServiceCollection services, Action<NewtonsoftJsonFormatterOptions> jsonSetup = null, Action<ServiceOptions> serviceSetup = null)

Parameters

services IServiceCollection

The IServiceCollection to extend.

jsonSetup Action<NewtonsoftJsonFormatterOptions>

The NewtonsoftJsonFormatterOptions which may be configured. Default is optimized for messaging.

serviceSetup Action<ServiceOptions>

The ServiceOptions which may be configured. Default is Singleton.

Returns

IServiceCollection

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

Remarks

The implementation will be type forwarded accordingly.

Exceptions

ArgumentNullException

services cannot be null.