Namespace ToSic.Sys.DI
Classes
- Generator<TService>
Lazy generator to create multiple new services/objects of a specific type.
- Generator<TService, TOptions>
Lazy generator to create multiple new services/objects of a specific type.
- KeyedServiceRegistrationExtensions
Helper for better managing keyed services in dependency injection. This allows for adding a marker to the service registration, which can be used later to retrieve the key associated with the service.
- KeyedServiceResolver
Helper to resolve keyed services from the DI container, and to discover which keys are available for a specific service.
- LazyImplementation<TService>
Enables lazy requesting of objects - won't be available until needed. This is a classic plain-vanilla implementation of Lazy for ServiceProviders.
Note that most code in the ToSic Namespace will prefer LazySvc<TService>
- LazySvc<TService>
Helps us create lazy Service objects.
- 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
- ISwitchableService
This describes a service which may have multiple implementations, and will be picked by the ServiceSwitcher<T>