Table of Contents

Class MvcCoreBuilderExtensions

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

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

public static class MvcCoreBuilderExtensions
Inheritance
Object
MvcCoreBuilderExtensions

Methods

AddJsonFormatters(IMvcCoreBuilder, Action<JsonFormatterOptions>)

Adds the JSON serializer formatters to MVC.

public static IMvcCoreBuilder AddJsonFormatters(this IMvcCoreBuilder builder, Action<JsonFormatterOptions> setup)

Parameters

builder IMvcCoreBuilder

The Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder.

setup Action<JsonFormatterOptions>

The JsonFormatterOptions 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.

AddJsonFormattersOptions(IMvcCoreBuilder, Action<JsonFormatterOptions>)

Adds configuration of JsonFormatterOptions for the application.

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

Parameters

builder IMvcCoreBuilder

The Microsoft.Extensions.DependencyInjection.IMvcBuilder.

setup Action<JsonFormatterOptions>

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