Table of Contents

AddNewtonsoftJsonFormattersOptions Method

Definition

Namespace
Codebelt.Extensions.AspNetCore.Mvc.Formatters.Newtonsoft.Json
Assemblies
Codebelt.Extensions.AspNetCore.Mvc.Formatters.Newtonsoft.Json.dll
Source
src/Codebelt.Extensions.AspNetCore.Mvc.Formatters.Newtonsoft.Json/MvcCoreBuilderExtensions.cs

AddNewtonsoftJsonFormattersOptions(IMvcCoreBuilder, Action<NewtonsoftJsonFormatterOptions>)

Adds configuration of NewtonsoftJsonFormatterOptions for the application.

public static IMvcCoreBuilder AddNewtonsoftJsonFormattersOptions(this IMvcCoreBuilder builder, Action<NewtonsoftJsonFormatterOptions> setup = null)

Parameters

builder IMvcCoreBuilder

The IMvcBuilder.

setup Action<NewtonsoftJsonFormatterOptions>

The NewtonsoftJsonFormatterOptions which need to be configured.

Returns

IMvcCoreBuilder

A reference to builder after the operation has completed.

Exceptions

ArgumentNullException

builder cannot be null.

ArgumentException

setup failed to configure an instance of NewtonsoftJsonFormatterOptions in a valid state.