Class NewtonsoftFormatterExtensions
Extends Microsoft.Extensions.DependencyInjection.IServiceCollection with convenience methods to register module formatters
Inheritance
System.Object
NewtonsoftFormatterExtensions
Namespace: Microsoft.Extensions.DependencyInjection
Assembly: EPiServer.Cms.AspNetCore.dll
Version: 12.0.3Syntax
public static class NewtonsoftFormatterExtensions : Object
Methods
UseNewtonsoftSerialization(IServiceCollection, IEnumerable<Type>, Action<JsonSerializerSettings>)
Registers newtonsoft IJsonInputFormatter and IJsonOutputFormatter for specified types
Declaration
public static IServiceCollection UseNewtonsoftSerialization(this IServiceCollection services, IEnumerable<Type> types, Action<JsonSerializerSettings> settings = null)
Parameters
Type | Name | Description |
---|---|---|
Microsoft.Extensions.DependencyInjection.IServiceCollection | services | |
System.Collections.Generic.IEnumerable<System.Type> | types | |
System.Action<Newtonsoft.Json.JsonSerializerSettings> | settings |
Returns
Type | Description |
---|---|
Microsoft.Extensions.DependencyInjection.IServiceCollection |
UseNewtonsoftSerialization(IServiceCollection, Assembly, Action<JsonSerializerSettings>)
Registers newtonsoft IJsonInputFormatter and IJsonOutputFormatter for the assembly
Declaration
public static IServiceCollection UseNewtonsoftSerialization(this IServiceCollection services, Assembly assembly, Action<JsonSerializerSettings> settings = null)
Parameters
Type | Name | Description |
---|---|---|
Microsoft.Extensions.DependencyInjection.IServiceCollection | services | |
System.Reflection.Assembly | assembly | |
System.Action<Newtonsoft.Json.JsonSerializerSettings> | settings |
Returns
Type | Description |
---|---|
Microsoft.Extensions.DependencyInjection.IServiceCollection |
UseNewtonsoftSerialization(IServiceCollection, Type, Action<JsonSerializerSettings>)
Registers newtonsoft IJsonInputFormatter and IJsonOutputFormatter for the type
Declaration
public static IServiceCollection UseNewtonsoftSerialization(this IServiceCollection services, Type type, Action<JsonSerializerSettings> settings = null)
Parameters
Type | Name | Description |
---|---|---|
Microsoft.Extensions.DependencyInjection.IServiceCollection | services | |
System.Type | type | |
System.Action<Newtonsoft.Json.JsonSerializerSettings> | settings |
Returns
Type | Description |
---|---|
Microsoft.Extensions.DependencyInjection.IServiceCollection |