AddMinimalNewtonsoftJsonOptions Method
Definition
- Namespace
- Codebelt.Extensions.AspNetCore.Newtonsoft.Json
- Assemblies
- Codebelt.Extensions.AspNetCore.Newtonsoft.Json.dll
AddMinimalNewtonsoftJsonOptions(IServiceCollection, Action<NewtonsoftJsonFormatterOptions>)
Adds a NewtonsoftJsonFormatterOptions service to the specified IServiceCollection.
public static IServiceCollection AddMinimalNewtonsoftJsonOptions(this IServiceCollection services, Action<NewtonsoftJsonFormatterOptions> setup = null)
Parameters
servicesIServiceCollectionThe IServiceCollection to add services to.
setupAction<NewtonsoftJsonFormatterOptions>The NewtonsoftJsonFormatterOptions which may be configured.
Returns
- IServiceCollection
An IServiceCollection that can be used to further configure other services.
Exceptions
- ArgumentNullException
servicescannot be null.