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