Class MyServicesBase
Base class for all MyServices. These are helper objects to get dependencies for a class. It should be used when the owning-class is expected to be inherited. This is important for inheriting classes to keep a stable constructor.
Can collect all objects which need the log and init that.
[PublicApi]
public abstract class MyServicesBase
- Inheritance
-
objectMyServicesBase
- Derived
Constructors
MyServicesBase(NoParamOrder, object[]?)
protected MyServicesBase(NoParamOrder protect = default, object[]? connect = null)
Parameters
protect
NoParamOrderconnect
object[]
Methods
ConnectLog<TService>(TService)
Experimental Connect-one, may be removed again.
protected TService ConnectLog<TService>(TService service)
Parameters
service
TService
Returns
- TService
the service passed in
Type Parameters
TService
ConnectLogs(object[])
Add objects to various queues to be auto-initialized when ConnectServices<TDependencies>(TDependencies, ILog) is called later on
protected void ConnectLogs(object[] services)
Parameters
services
object[]One or more services which could implement ToSic.Lib.DI.ILazyInitLog or IHasLog