Table of Contents

Class MvcBuilderExtensions

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

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

public static class MvcBuilderExtensions
Inheritance
Object
MvcBuilderExtensions

Methods

AddJsonFormatters(IMvcBuilder, Action<JsonFormatterOptions>)

Adds the JSON serializer formatters to MVC.

public static IMvcBuilder AddJsonFormatters(this IMvcBuilder builder, Action<JsonFormatterOptions> setup = null)

Parameters

builder IMvcBuilder

The Microsoft.Extensions.DependencyInjection.IMvcBuilder.

setup Action<JsonFormatterOptions>

The JsonFormatterOptions which may be configured.

Returns

IMvcBuilder

A reference to builder after the operation has completed.

Exceptions

System.ArgumentNullException

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

AddJsonFormattersOptions(IMvcBuilder, Action<JsonFormatterOptions>)

Adds configuration of JsonFormatterOptions for the application.

public static IMvcBuilder AddJsonFormattersOptions(this IMvcBuilder builder, Action<JsonFormatterOptions> setup = null)

Parameters

builder IMvcBuilder

The Microsoft.Extensions.DependencyInjection.IMvcBuilder.

setup Action<JsonFormatterOptions>

The JsonFormatterOptions which need to be configured.

Returns

IMvcBuilder

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 JsonFormatterOptions in a valid state.