AddNewtonsoftJsonFormattersOptions Method
Definition
- Namespace
- Codebelt.Extensions.AspNetCore.Mvc.Formatters.Newtonsoft.Json
- Assemblies
- Codebelt.Extensions.AspNetCore.Mvc.Formatters.Newtonsoft.Json.dll
AddNewtonsoftJsonFormattersOptions(IMvcBuilder, Action<NewtonsoftJsonFormatterOptions>)
Adds configuration of NewtonsoftJsonFormatterOptions for the application.
public static IMvcBuilder AddNewtonsoftJsonFormattersOptions(this IMvcBuilder builder, Action<NewtonsoftJsonFormatterOptions> setup = null)
Parameters
builderIMvcBuilderThe IMvcBuilder.
setupAction<NewtonsoftJsonFormatterOptions>The NewtonsoftJsonFormatterOptions which need to be configured.
Returns
- IMvcBuilder
A reference to
builderafter the operation has completed.
Exceptions
- ArgumentNullException
buildercannot be null.- ArgumentException
setupfailed to configure an instance of NewtonsoftJsonFormatterOptions in a valid state.