Table of Contents

Class ServiceCollectionExtensions

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

Extension methods for the IServiceCollection interface.

public static class ServiceCollectionExtensions
Inheritance
ServiceCollectionExtensions

Methods

AddJsonMarshaller(IServiceCollection, Action<JsonFormatterOptions>, Action<ServiceOptions>)

Adds an JsonMarshaller implementation to the specified IServiceCollection.

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

Parameters

services IServiceCollection

The IServiceCollection to extend.

jsonSetup Action<JsonFormatterOptions>

The JsonFormatterOptions 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.