Class CompositeServiceHost
Represents a service that contains other child services. Start/Stop commands translate into child sub-commands. This class is used to host other services in various job/background process hosts
Implements
System.IDisposable
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: NFX.ServiceModel
Assembly: NFX.dll
Syntax
public class CompositeServiceHost : Service, IApplicationComponent, IDisposable, IService, INamed, IConfigurable, ILocalizedTimeProvider
Constructors
CompositeServiceHost(Object)
Declaration
public CompositeServiceHost(object director)
Parameters
Type | Name | Description |
---|---|---|
System.Object | director |
Fields
CONFIG_ABORT_START_ATTR
Declaration
public const string CONFIG_ABORT_START_ATTR = "abort-start"
Field Value
Type | Description |
---|---|
System.String |
CONFIG_IGNORE_THIS_SERVICE_ATTR
Declaration
public const string CONFIG_IGNORE_THIS_SERVICE_ATTR = "ignore-this-service"
Field Value
Type | Description |
---|---|
System.String |
CONFIG_SERVICE_HOST_SECTION
Declaration
public const string CONFIG_SERVICE_HOST_SECTION = "service-host"
Field Value
Type | Description |
---|---|
System.String |
CONFIG_SERVICE_SECTION
Declaration
public const string CONFIG_SERVICE_SECTION = "service"
Field Value
Type | Description |
---|---|
System.String |
Properties
ChildServices
Returns service registry where services can be looked-up by name
Declaration
public IRegistry<ChildService> ChildServices { get; }
Property Value
Type | Description |
---|---|
IRegistry<ChildService> |
OrderedChildServices
Returns services ordered by their order property
Declaration
public IEnumerable<ChildService> OrderedChildServices { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<ChildService> |
Methods
Destructor()
Declaration
protected override void Destructor()
Overrides
DoAcceptManagerVisit(Object, DateTime)
Declaration
protected override void DoAcceptManagerVisit(object manager, DateTime managerNow)
Parameters
Type | Name | Description |
---|---|---|
System.Object | manager | |
System.DateTime | managerNow |
Overrides
DoCheckForCompleteStop()
Declaration
protected override bool DoCheckForCompleteStop()
Returns
Type | Description |
---|---|
System.Boolean |
Overrides
DoConfigure(IConfigSectionNode)
Declaration
protected override void DoConfigure(IConfigSectionNode node)
Parameters
Type | Name | Description |
---|---|---|
IConfigSectionNode | node |
Overrides
DoSignalStop()
Declaration
protected override void DoSignalStop()
Overrides
DoStart()
Declaration
protected override void DoStart()
Overrides
DoWaitForCompleteStop()
Declaration
protected override void DoWaitForCompleteStop()
Overrides
RegisterService(Service, Int32, Boolean)
Returns true if child service was registered, false if it was already registered prior tp this call. The method may only be called on stopped (this) service
Declaration
public bool RegisterService(Service service, int order, bool abortStart)
Parameters
Type | Name | Description |
---|---|---|
Service | service | |
System.Int32 | order | |
System.Boolean | abortStart |
Returns
Type | Description |
---|---|
System.Boolean |
UnregisterService(Service)
Returns true if child service was unregistered, false if it did not exist. The method may only be called on stopped (this) service
Declaration
public bool UnregisterService(Service service)
Parameters
Type | Name | Description |
---|---|---|
Service | service |
Returns
Type | Description |
---|---|
System.Boolean |
Implements
System.IDisposable