Table of Contents

Namespace ToSic.Sys.DI

Classes

Ctx<TService>

Experimental class to allow for overriding a service in a specific context. This is useful for testing or for scenarios where you want to temporarily replace a service with a different implementation.

Generator<TService>

Generator to create multiple new services/objects of a specific type.

Generator<TService, TOptions>

Generator to create multiple new services/objects of a specific type requiring options for setup.

OverrideService<TService>

Dependency Injection helper to override a service type with a different implementation.

ServiceSwitcherSingleton<T>

Similar to the ServiceSwitcher<T> but special.

ServiceSwitcher<T>

Service to pick one of various services which implement ISwitchableService

Interfaces

IAllKeyedServices<TKey, TService>

Generic interface to get all keyed services by name.

ISwitchableService

This describes a service which may have multiple implementations, and will be picked by the ServiceSwitcher<T>

ISysServiceProvider

Special interface to clearly see when our service provider - which can handle stacking, is being used.