Click or drag to resize
Service Class
Provides service management and resolution functionality for the system.
Inheritance Hierarchy
SystemObject
  CMS.CoreService

Namespace: CMS.Core
Assembly: CMS.Core (in CMS.Core.dll) Version: 13.0.131
Syntax
C#
public static class Service

The Service type exposes the following members.

Methods
  NameDescription
Public methodStatic memberConfigureTOptions
Configures TOptions.
Public methodStatic memberInitializeContainer
Initialize container for services resolution. No action is performed when container was already initialized
Public methodStatic memberIsRegistered(Type) Obsolete.
Indicates whether service has an implementation registered.
Public methodStatic memberIsRegisteredTService Obsolete.
Indicates whether TService has an implementation registered.
Public methodStatic memberMergeDescriptors
Merges registered services (descriptors) that were registered through RegisterImplementationAttribute or one of 'CMS.Core.Service.Use' methods to the serviceDescriptors collection. After the merge the services are ordered in the ascending order by their priority. Firstly, services registered with the Fallback priority, then services from serviceDescriptors, then services with the SystemDefault priority and then with the Default priority.
Public methodStatic memberResolve(Type)
Returns an instance of serviceType as registered within the system. Only services with Singleton or Transient are resolved.
Public methodStatic memberResolveTService
Returns an instance of TService as registered within the system. Only services with Singleton or Transient are resolved.
Public methodStatic memberResolveOptional(Type)
Returns an instance of serviceType as registered within the system or when no resolution is possible. Only services with Singleton or Transient are resolved.
Public methodStatic memberResolveOptionalTService
Returns an instance of TService as registered within the system or when no resolution is possible. Only services with Singleton or Transient are resolved.
Public methodStatic memberUse(Type, Object, String)
Sets instance to be used as implementation of service.
Public methodStatic memberUse(Type, FuncObject, String, Boolean)
Sets factoryMethod to be used as a provider of implementation of service.
Public methodStatic memberUse(Type, Type, String, Boolean)
Sets implementation to be used as implementation of service.
Public methodStatic memberUseTService(Object, String)
Sets instance to be used as implementation of TService.
Public methodStatic memberUseTService(FuncObject, String, Boolean, RegistrationPriority)
Sets factoryMethod to be used as a provider of implementation of TService.
Public methodStatic memberUseTService, TImplementation(String, Boolean)
Sets TImplementation to be used as implementation of TService.
Top
See Also