Class ServiceCollectionExtensions
- Namespace
- Savvyio.Extensions.DependencyInjection.Text.Json
- Assembly
- Savvyio.Extensions.DependencyInjection.Text.Json.dll
Extension methods for the IServiceCollection interface.
public static class ServiceCollectionExtensions
- Inheritance
-
ServiceCollectionExtensions
Methods
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.