Click or drag to resize

DependencyServiceManager Class

The core implementation of IServiceProvider and IServiceManager that supports SanteDB's dependency injection technology.
Inheritance Hierarchy
SystemObject
  SanteDB.Core.Services.ImplDependencyServiceManager

Namespace:  SanteDB.Core.Services.Impl
Assembly:  SanteDB.Core.Api (in SanteDB.Core.Api.dll) Version: 2.2.1
Syntax
public class DependencyServiceManager : IServiceManager, 
	IServiceProvider, IDaemonService, IServiceImplementation, IDisposable

The DependencyServiceManager type exposes the following members.

Constructors
  NameDescription
Public methodDependencyServiceManager
Creates a new dependency service manager
Top
Properties
  NameDescription
Public propertyIsRunning
True if the service is running
Public propertyServiceName
Gets the service name
Top
Methods
  NameDescription
Public methodAddServiceFactory
Add a service factory
Public methodAddServiceProvider(Object)
Adds a singleton
Public methodAddServiceProvider(Type)
Adds a service provider
Public methodCreateInjected(Type)
Create injected type
Public methodCreateInjectedTObject
Create injected instance
Public methodCreateInjectedOfAllTInterface
Create injected instances of all implementers of the specified TInterface
Public methodDispose
Dispose of this object
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetAllTypes
Get all types
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetService
Get the specified service
Public methodGetServices
Gets all service instances
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodRemoveServiceProvider
Remove a service provider
Public methodStart
Start the process
Public methodStop
Stop this instance
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Events
  NameDescription
Public eventStarted
Application has started
Public eventStarting
Application is starting
Public eventStopped
Application has stopped
Public eventStopping
Application is stopping
Top
Extension Methods
  NameDescription
Public Extension MethodAddBusinessRule(Type)Overloaded.
Add a business rule service to this instance of me or the next instance
(Defined by BusinessRulesExtensions.)
Public Extension MethodAddBusinessRuleTModel(Type)Overloaded.
Adds a new business rule service for the specified model to the application service otherwise adds it to the chain
(Defined by BusinessRulesExtensions.)
Public Extension MethodConvertTReturn
The purpose of this method is to convert object me to TReturn. Why? Because if you have an instance of Act that actually needs to be a SubstanceAdministration we can't just cast so we have to copy.
(Defined by ExtensionMethods.)
Public Extension MethodGetBusinessRuleService
Add a business rule service to this instance of me or the next instance
(Defined by BusinessRulesExtensions.)
Public Extension MethodGetInstanceOfTDomain
Gets an instance of TDomain from me
(Defined by ModelExtensions.)
Public Extension MethodGetServiceT
Helper extension method for getting strongly typed service
(Defined by ApplicationServiceContext.)
Top
Remarks

The dependency injection service manager is responsible for:

Note: You must have an IConfigurationManager instance registered in the application service context prior to calling the Start() method on this class

See Also