Table of Contents

AddJsonMarshaller Method

Definition

Namespace
Savvyio.Extensions.DependencyInjection.Text.Json
Assemblies
Savvyio.Extensions.DependencyInjection.Text.Json.dll
Source
src/Savvyio.Extensions.DependencyInjection.Text.Json/ServiceCollectionExtensions.cs

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.