Table of Contents

AddMinimalNewtonsoftJsonOptions Method

Definition

Namespace
Codebelt.Extensions.AspNetCore.Newtonsoft.Json
Assemblies
Codebelt.Extensions.AspNetCore.Newtonsoft.Json.dll
Source
src/Codebelt.Extensions.AspNetCore.Newtonsoft.Json/ServiceCollectionExtensions.cs

AddMinimalNewtonsoftJsonOptions(IServiceCollection, Action<NewtonsoftJsonFormatterOptions>)

Adds a NewtonsoftJsonFormatterOptions service to the specified IServiceCollection.

public static IServiceCollection AddMinimalNewtonsoftJsonOptions(this IServiceCollection services, Action<NewtonsoftJsonFormatterOptions> setup = null)

Parameters

services IServiceCollection

The IServiceCollection to add services to.

setup Action<NewtonsoftJsonFormatterOptions>

The NewtonsoftJsonFormatterOptions which may be configured.

Returns

IServiceCollection

An IServiceCollection that can be used to further configure other services.

Exceptions

ArgumentNullException

services cannot be null.