AddJsonMarshaller Method
Definition
- Namespace
- Savvyio.Extensions.DependencyInjection.Text.Json
- Assemblies
- Savvyio.Extensions.DependencyInjection.Text.Json.dll
AddJsonMarshaller(IServiceCollection, Action<JsonFormatterOptions>, Action<ServiceOptions>)
Adds an JsonMarshaller implementation to the specified IServiceCollection.
public static IServiceCollection AddJsonMarshaller(this IServiceCollection services, Action<JsonFormatterOptions> jsonSetup = null, Action<ServiceOptions> serviceSetup = null)
Parameters
servicesIServiceCollectionThe IServiceCollection to extend.
jsonSetupAction<JsonFormatterOptions>The JsonFormatterOptions which may be configured. Default is optimized for messaging.
serviceSetupAction<ServiceOptions>The ServiceOptions which may be configured. Default is Singleton.
Returns
- IServiceCollection
A reference to
servicesso that additional calls can be chained.
Remarks
The implementation will be type forwarded accordingly.
Exceptions
- ArgumentNullException
servicescannot be null.