AddJsonFormatterOptions Method
Definition
- Namespace
- Cuemon.Extensions.AspNetCore.Text.Json.Formatters
- Assemblies
- Cuemon.Extensions.AspNetCore.Text.Json.dll
AddJsonFormatterOptions(IServiceCollection, Action<JsonFormatterOptions>)
Adds configuration of JsonFormatterOptions for the application.
public static IServiceCollection AddJsonFormatterOptions(this IServiceCollection services, Action<JsonFormatterOptions> setup = null)
Parameters
servicesIServiceCollectionThe IServiceCollection to extend.
setupAction<JsonFormatterOptions>The JsonFormatterOptions which may be configured.
Returns
- IServiceCollection
A reference to
servicesso that additional configuration calls can be chained.
Exceptions
- ArgumentNullException
servicescannot be null.- ArgumentException
setupfailed to configure an instance of JsonFormatterOptions in a valid state.