Table of Contents

Class MvcCoreBuilderExtensions

Namespace
Cuemon.Extensions.AspNetCore.Mvc.Formatters.Newtonsoft.Json
Assembly
Cuemon.Extensions.AspNetCore.Mvc.Formatters.Newtonsoft.Json.dll

Extension methods for the Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder interface.

public static class MvcCoreBuilderExtensions
Inheritance
Object
MvcCoreBuilderExtensions

Methods

AddNewtonsoftJsonFormatters(IMvcCoreBuilder, Action<NewtonsoftJsonFormatterOptions>)

Adds the JSON serializer formatters to MVC.

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

Parameters

builder IMvcCoreBuilder

The Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder.

setup Action<NewtonsoftJsonFormatterOptions>

The NewtonsoftJsonFormatterOptions which may be configured.

Returns

IMvcCoreBuilder

A reference to builder after the operation has completed.

Exceptions

System.ArgumentNullException

builder cannot be null -or- setup cannot be null.

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 Microsoft.Extensions.DependencyInjection.IMvcBuilder.

setup Action<NewtonsoftJsonFormatterOptions>

The NewtonsoftJsonFormatterOptions which need to be configured.

Returns

IMvcCoreBuilder

A reference to builder after the operation has completed.

Exceptions

System.ArgumentNullException

builder cannot be null.

System.ArgumentException

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