Table of Contents

AddServiceLocator Method

Definition

Namespace
Savvyio.Extensions.DependencyInjection
Assemblies
Savvyio.Extensions.DependencyInjection.dll
Source
src/Savvyio.Extensions.DependencyInjection/ServiceCollectionExtensions.cs

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

services IServiceCollection

The IServiceCollection to extend.

setup Action<ServiceLocatorOptions>

The ServiceLocatorOptions which may be configured.

Returns

IServiceCollection

A reference to services so that additional calls can be chained.

Exceptions

ArgumentNullException

services cannot be null.