Namespace ToSic.Lib.DI
Classes
- Generator<TService>
Lazy generator to create multiple new services/objects of a specific type.
- 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. It has some special features:
- It will automatically lazy-attach a logger when used correctly
- It can also be configured with a lazy init function to keep code clean.
This reduces the amount of plumbing in many code files.
It will detect if the provided object/service supports these features. So if it's used for anything that doesn't support logging it will just behave like
Lazy
.