NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

ServiceBase Members

Public:

Constructor

ServiceBase Constructor [To be supplied.]

Properties

AutoLog If true the service will use event log to report Command failures, and information for: Start Stop Pause Continue
CanPauseAndContinue Determines whether the service can be paused. If false, the Pause and Continue controls in the Services applet will be disabled, and the OnPause and OnContinue methods will not be called.
CanShutdown [To be supplied.]
CanStop Determines whether the service can be stopped once it has started. If false, the OnStop method will not be called.
EventLog An EventLog object you can use to write to the event log. It is already initialized to an object with the correct Source and Log properties set.
ServiceName Gets the short name of the Service used to identify it to the system.
Site [To be supplied.]

Methods

Dispose Function calles when all the services in the application have reached the stopped state. Need to free the allocated memory.
Equals (inherited from Object) Determines whether the specified Object is the same instance as the current Object. Subclasses are expected to override this method to support value equality (not reference equality).
GetContainer (inherited from Component) Returns the IContainer that contains the Component.
GetDesignMode (inherited from Component) Gets a value indicating whether the Component is currently in design mode.
GetHashCode (inherited from Object) Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetServiceObject (inherited from Component) Returns an object representing a service provided by the Component.
GetType (inherited from Object) Gets the Type of the Object.
Run Overloaded. [To be supplied.]
ToString (inherited from Component) Returns a String containing the name of the Component, if any. This method should not be overridden. For internal use only.

Fields

MAX_NAME_LENGTH Constant for name size.

Protected:

Methods

Finalize (inherited from Object) Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by the Garbage Collector (GC). This method may be ignored by the runtime; therefore, necessary cleanup operations should be done elsewhere.
MemberwiseClone (inherited from Object) Creates a shallow copy of the current Object.
OnContinue Called when a Continue Command message is sent to to the service. This function is expected to be overridden when the CanPauseAndContinue property is true.
OnCustomCommand Called when a custom command message is sent to to the service. This function is expected to be overridden if the CustomCommandsAccepted property is non-zero.
OnPause Called when a Pause Command message is sent to to the service. This function is expected to be overridden when the CanPauseAndContinue property is true.
OnShutdown Called when the system is shutting down. This function should be overridden when the CanShutdown property is true.
OnStart Called when the service is being started. You must override this function in order to start your service.
OnStop Called when a Stop Command message is sent to to the service. This function is expected to be overridden when the CanStop property is true.

See Also

ServiceBase Class | System.ServiceProcess Namespace