ServiceResolveOptionalTService Method |
Returns an instance of
TService as registered within the system
or
when no resolution is possible.
Only services with
Singleton or
Transient are resolved.
Namespace: CMS.CoreAssembly: CMS.Core (in CMS.Core.dll) Version: 13.0.131
Syntax public static TService ResolveOptional<TService>()
Type Parameters
- TService
- Service type to be resolved.
Return Value
Type:
TServiceReturns an instance of
TService or
.
Exceptions Exception | Condition |
---|
ServiceResolutionException |
Thrown when resolution of TService fails. This typically occurs when
the implementing type has dependencies which cannot be satisfied.
|
See Also