These v19 docs are archived 🔒.
Go to the
latest docs home
or try if
this exact page is available
in the latest docs.
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
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
ConnectService<TService>(TService)
Experimental Connect-one, may be removed again.
protected TService ConnectService<TService>(TService service)
Parameters
service
TService
Returns
- TService
the service passed in
Type Parameters
TService
ConnectServices(params object[])
[Obsolete("Avoid using, will be removed soon. Use ConnectLogs([...])")]
protected void ConnectServices(params object[] services)
Parameters
services
object[]