AddMarshaller Method
Definition
- Namespace
- Savvyio.Extensions.DependencyInjection
- Assemblies
- Savvyio.Extensions.DependencyInjection.dll
AddMarshaller<TService>(IServiceCollection, Action<ServiceOptions>)
Adds an implementation of IMarshaller to the specified IServiceCollection.
public static IServiceCollection AddMarshaller<TService>(this IServiceCollection services, Action<ServiceOptions> setup = null) where TService : class, IMarshaller
Parameters
servicesIServiceCollectionThe IServiceCollection to add the service to.
setupAction<ServiceOptions>The ServiceOptions which may be configured.
Returns
- IServiceCollection
A reference to
servicesso that additional calls can be chained.
Type Parameters
TServiceThe type of the IMarshaller to add.
Exceptions
- ArgumentNullException
servicescannot be null.
AddMarshaller<TService>(IServiceCollection, Func<IServiceProvider, TService>, Action<ServiceOptions>)
Adds an implementation of IMarshaller to the specified IServiceCollection.
public static IServiceCollection AddMarshaller<TService>(this IServiceCollection services, Func<IServiceProvider, TService> implementationFactory, Action<ServiceOptions> setup = null) where TService : class, IMarshaller
Parameters
servicesIServiceCollectionThe IServiceCollection to add the service to.
implementationFactoryFunc<IServiceProvider, TService>The function delegate that creates the service.
setupAction<ServiceOptions>The ServiceOptions which may be configured.
Returns
- IServiceCollection
A reference to
servicesso that additional calls can be chained.
Type Parameters
TServiceThe type of the IMarshaller to add.
Exceptions
- ArgumentNullException
servicescannot be null -or-implementationFactorycannot be null.