Click or drag to resize

ServiceHelper Class

Component that provides added functionality to a Windows Service.
Inheritance Hierarchy
SystemObject
  SystemMarshalByRefObject
    System.ComponentModelComponent
      GSF.ServiceProcessServiceHelper

Namespace: GSF.ServiceProcess
Assembly: GSF.ServiceProcess (in GSF.ServiceProcess.dll) Version: 2.4.218-beta
Syntax
View Source

The ServiceHelper type exposes the following members.

Constructors
 NameDescription
Public methodServiceHelper Initializes a new instance of the ServiceHelper class.
Public methodServiceHelper(IContainer) Initializes a new instance of the ServiceHelper class.
Top
Properties
 NameDescription
Protected propertyCanRaiseEventsGets a value indicating whether the component can raise an event.
(Inherited from Component)
Public propertyClientRequestHandlers Gets a list of ClientRequestHandler registered for handling requests from RemoteClients.
Public propertyClientRequestHistory Gets a list of ClientRequestInfo for requests made by RemoteClients.
Public propertyConnectionErrorLogger Gets the ErrorLogger component used for logging connection related exceptions encountered in the ParentService.
Public propertyContainerGets the IContainer that contains the Component.
(Inherited from Component)
Protected propertyDesignModeGets a value that indicates whether the Component is currently in design mode.
(Inherited from Component)
Public propertyEnabled Gets or sets a boolean value that indicates whether the ServiceHelper is currently enabled.
Public propertyErrorLogger Gets the ErrorLogger component used for logging errors encountered in the ParentService.
Protected propertyEventsGets the list of event handlers that are attached to this Component.
(Inherited from Component)
Public propertyHealthMonitorInterval Gets or sets the interval, in seconds, over which to sample the performance monitor for health statistics.
Public propertyIsDisposed Gets a flag that indicates whether the object has been disposed.
Public propertyLogStatusUpdates Gets or sets a boolean value that indicates whether messages sent using UpdateStatus(UpdateType, String, Object) or UpdateStatus(Guid, UpdateType, String, Object) are to be logged to the StatusLog.
Public propertyMaxStatusUpdatesFrequency Gets or sets the maximum number of status update messages that can be issued in a second without getting suppressed from being displayed.
Public propertyMaxStatusUpdatesLength Gets or sets the maximum numbers of characters allowed in update status messages without getting suppressed from being displayed.
Public propertyMonitorServiceHealth Gets or sets a boolean value that indicates whether the health of the ParentService is to be monitored.
Public propertyName Gets the unique identifier of the ServiceHelper.
Public propertyParentService Gets or sets the ServiceBase to which the ServiceHelper will provided added functionality.
Public propertyPerformanceMonitor Gets the PerformanceMonitor object used for monitoring the health of the ParentService.
Public propertyPersistSettings Gets or sets a boolean value that indicates whether the settings of ServiceHelper are to be saved to the config file.
Public propertyProcesses Gets a list of ServiceProcess defined in the ServiceHelper.
Public propertyProcessScheduler Gets the ScheduleManager component used for scheduling defined ServiceProcess.
Public propertyRemoteClients Gets a list of ClientInfo for remote clients connected to the RemotingServer.
Public propertyRemotingServer Gets or sets the ServerBase component used for communicating with RemoteClients.
Public propertyRequestHistoryLimit Gets or sets the maximum number of ClientRequest entries to be maintained in the ClientRequestHistory.
Public propertySecureRemoteInteractions Gets or sets a boolean value that indicates whether ServiceHelper will secure remote interactions from ClientHelper.
Public propertySerializationFormat Gets or sets a value that indicates the desired message SerializationFormat for interaction with ClientHelper.
Public propertyServiceComponents Gets a list of components that implement the ISupportLifecycle interface used by the ParentService.
Public propertySettingsCategory Gets or sets the category under which the settings of ServiceHelper are to be saved to the config file if the PersistSettings property is set to true.
Public propertySiteGets or sets the ISite of the Component.
(Inherited from Component)
Public propertyStatus Gets the descriptive status of the ServiceHelper.
Public propertyStatusLog Gets the LogFile component used for logging status messages to a text file.
Public propertySupportFileManagementCommands Gets or sets boolean value that indicates whether the ServiceHelper will have support for file-management commands.
Public propertySupportSystemCommands Gets or sets a boolean value that indicates whether ServiceHelper commands will have support for system-level access (-system switch).
Public propertySupportTelnetSessions Gets or sets a boolean value that indicates whether the ServiceHelper will have support for remote telnet-like sessions.
Top
Methods
 NameDescription
Public methodAddProcess(ActionString, Object, String) Adds a new ServiceProcess to the ServiceHelper.
Public methodAddProcess(ActionString, Object, String, Object) Adds a new ServiceProcess to the ServiceHelper.
Public methodAddScheduledProcess(ActionString, Object, String, String) Adds a new ServiceProcess to the ServiceHelper that executes on a schedule.
Public methodAddScheduledProcess(ActionString, Object, String, Object, String) Adds a new ServiceProcess to the ServiceHelper that executes on a schedule.
Public methodBeginInit Performs necessary operations before the ServiceHelper properties are initialized.
Public methodCreateObjRefCreates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object.
(Inherited from MarshalByRefObject)
Public methodDisconnectClient Disconnects the client from the service.
Public methodDisposeReleases all resources used by the Component.
(Inherited from Component)
Protected methodDispose(Boolean) Releases the unmanaged resources used by the ServiceHelper object and optionally releases the managed resources.
(Overrides ComponentDispose(Boolean))
Public methodEndInit Performs necessary operations after the ServiceHelper properties are initialized.
Public methodEqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
Protected methodFinalizeReleases unmanaged resources and performs other cleanup operations before the Component is reclaimed by garbage collection.
(Inherited from Component)
Public methodFindClientRequestHandler Returns the ClientRequestHandler object for the specified handlerCommand.
Public methodFindConnectedClient Returns the ClientInfo object for the specified clientID.
Public methodFindProcess Returns the ServiceProcess for the specified processName.
Public methodGetHashCodeServes as the default hash function.
(Inherited from Object)
Public methodGetLifetimeServiceRetrieves the current lifetime service object that controls the lifetime policy for this instance.
(Inherited from MarshalByRefObject)
Protected methodGetServiceReturns an object that represents a service provided by the Component or by its Container.
(Inherited from Component)
Public methodGetTypeGets the Type of the current instance.
(Inherited from Object)
Public methodInitialize Initializes the ServiceHelper.
Public methodInitializeLifetimeServiceObtains a lifetime service object to control the lifetime policy for this instance.
(Inherited from MarshalByRefObject)
Public methodLoadSettings Loads saved settings of the ServiceHelper from the config file if the PersistSettings property is set to true.
Public methodLoadSettings(Boolean) Loads saved settings of the ServiceHelper from the config file if the PersistSettings property is set to true.
Public methodLogConnectionException Log exception to ConnectionErrorLogger.
Public methodLogException Log exception to ErrorLogger.
Protected methodMemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object)
Protected methodMemberwiseClone(Boolean)Creates a shallow copy of the current MarshalByRefObject object.
(Inherited from MarshalByRefObject)
Protected methodOnLoggedException Raises LoggedException event with logged exception.
Public methodOnPause To be called from the OnPause method of ParentService.
Protected methodOnProcessStateChanged Raises the ProcessStateChanged event.
Protected methodOnReceivedClientRequest Raises the ReceivedClientRequest event.
Public methodOnResume To be called from the OnContinue method of ParentService.
Protected methodOnSendingClientResponse Raises the SendingClientResponse event.
Protected methodOnServicePaused Raises the ServicePaused event.
Protected methodOnServicePausing Raises the ServicePausing event.
Protected methodOnServiceResumed Raises the ServiceResumed event.
Protected methodOnServiceResuming Raises the ServiceResuming event.
Protected methodOnServiceStarted Raises the ServiceStarted event.
Protected methodOnServiceStarting Raises the ServiceStarting event.
Protected methodOnServiceStopped Raises the ServiceStopped event.
Protected methodOnServiceStopping Raises the ServiceStopping event.
Public methodOnShutdown To be called from the OnShutdown method of ParentService.
Public methodOnStart To be called from the OnStart(String) method of ParentService.
Public methodOnStop To be called from the OnStop method of ParentService.
Protected methodOnSystemShutdown Raises the SystemShutdown event.
Protected methodOnUpdatedStatus Raises the UpdatedStatus event with the updated status message.
Public methodRemoveProcess Removes an existing ServiceProcess from the ServiceHelper.
Public methodRemoveScheduledProcess Removes an existing ServiceProcess from the ServiceHelper that is scheduled for automatic execution.
Public methodSaveSettings Saves settings of the ServiceHelper to the config file if the PersistSettings property is set to true.
Public methodSaveSettings(Boolean) Saves settings of the ServiceHelper to the config file if the PersistSettings property is set to true.
Public methodScheduleProcess(String, String) Schedules an existing ServiceProcess for automatic execution.
Public methodScheduleProcess(String, String, Boolean) Schedules an existing ServiceProcess for automatic execution.
Public methodSendActionableResponse Sends an actionable response to client along with an optional formatted message and attachment.
Public methodSendResponse(ServiceResponse) Sends the specified response to all RemoteClients.
Public methodSendResponse(Guid, ServiceResponse) Sends the specified response to the specified client only.
Public methodSendResponse(Guid, ServiceResponse, Boolean) Sends the specified response to the specified client only.
Public methodToStringReturns a String containing the name of the Component, if any. This method should not be overridden.
(Inherited from Component)
Public methodUnscheduleProcess Unschedules an existing ServiceProcess scheduled for automatic execution.
Public methodUpdateStatus(UpdateType, String, Object) Provides a status update to all RemoteClients.
Public methodUpdateStatus(Guid, UpdateType, String, Object) Provides a status update to the specified client.
Public methodUpdateStatus(UpdateType, Boolean, String, Object) Provides a status update to all RemoteClients.
Public methodUpdateStatus(Guid, UpdateType, Boolean, String, Object) Provides a status update to the specified client.
Public methodUpdateStatusAppendLine(UpdateType, String, Object) Provides a line terminated status update to all RemoteClients.
Public methodUpdateStatusAppendLine(Guid, UpdateType, String, Object) Provides a line terminated status update to the specified client.
Top
Events
 NameDescription
Public eventDisposedOccurs when the component is disposed by a call to the Dispose method.
(Inherited from Component)
Public eventLoggedException Provides notification of when there is an exception logged.
Public eventProcessStateChanged Occurs when the state of a defined ServiceProcess changes.
Public eventReceivedClientRequest Occurs when a request is received from one of the RemoteClients.
Public eventSendingClientResponse Occurs when a response is being sent to one or more RemoteClients.
Public eventServicePaused Occurs when the ParentService has paused.
Public eventServicePausing Occurs when the ParentService is pausing.
Public eventServiceResumed Occurs when the ParentService has resumed.
Public eventServiceResuming Occurs when the ParentService is resuming.
Public eventServiceStarted Occurs when the ParentService has started.
Public eventServiceStarting Occurs when the ParentService is starting.
Public eventServiceStopped Occurs when the ParentService has stopped.
Public eventServiceStopping Occurs when the ParentService is stopping.
Public eventSystemShutdown Occurs when the system is being shutdown.
Public eventUpdatedStatus Provides notification of when status messages were sent to consumer(s).
Top
Fields
 NameDescription
Public fieldStatic memberDefaultHealthMonitorInterval Specifies the default value for the HealthMonitorInterval property.
Public fieldStatic memberDefaultLogStatusUpdates Specifies the default value for the LogStatusUpdates property.
Public fieldStatic memberDefaultMaxStatusUpdatesFrequency Specifies the default value for the MaxStatusUpdatesFrequency property.
Public fieldStatic memberDefaultMaxStatusUpdatesLength Specifies the default value for the MaxStatusUpdatesLength property.
Public fieldStatic memberDefaultMonitorServiceHealth Specifies the default value for the MonitorServiceHealth property.
Public fieldStatic memberDefaultPersistSettings Specifies the default value for the PersistSettings property.
Public fieldStatic memberDefaultRequestHistoryLimit Specifies the default value for the RequestHistoryLimit property.
Public fieldStatic memberDefaultSecureRemoteInteractions Specifies the default value for the SecureRemoteInteractions property.
Public fieldStatic memberDefaultSerializationFormat Specifies the default value for the SerializationFormat property.
Public fieldStatic memberDefaultSettingsCategory Specifies the default value for the SettingsCategory property.
Public fieldStatic memberDefaultSupportFileManagementCommands Specifies the default value for the SupportFileManagementCommands property.
Public fieldStatic memberDefaultSupportSystemCommands Specifies the default value for the SupportSystemCommands property.
Public fieldStatic memberDefaultSupportTelnetSessions Specifies the default value for the SupportTelnetSessions property.
Top
Extension Methods
 NameDescription
Public Extension MethodGetEnumValueOrDefault Gets the enumeration constant for value, if defined in the enumeration, or a default value.
(Defined by EnumExtensions)
Public Extension MethodGetEnumValueOrDefaultT Gets the enumeration constant for this value, if defined in the enumeration, or a default value.
(Defined by EnumExtensions)
Top
See Also