AddServiceLocator Method
Definition
- Namespace
- Savvyio.Extensions.DependencyInjection
- Assemblies
- Savvyio.Extensions.DependencyInjection.dll
AddServiceLocator(IServiceCollection, Action<ServiceLocatorOptions>)
Adds Savvy I/O service locator used to resolve necessary dependencies.
public static IServiceCollection AddServiceLocator(this IServiceCollection services, Action<ServiceLocatorOptions> setup = null)
Parameters
servicesIServiceCollectionThe IServiceCollection to extend.
setupAction<ServiceLocatorOptions>The ServiceLocatorOptions which may be configured.
Returns
- IServiceCollection
A reference to
servicesso that additional calls can be chained.
Exceptions
- ArgumentNullException
servicescannot be null.