mirror of
https://github.com/ckaczor/WeatherService.git
synced 2026-01-14 01:25:43 -05:00
Initial commit
This commit is contained in:
46
Framework/IWindowsService.cs
Normal file
46
Framework/IWindowsService.cs
Normal file
@@ -0,0 +1,46 @@
|
||||
using System;
|
||||
|
||||
namespace WeatherService.Framework
|
||||
{
|
||||
/// <summary>
|
||||
/// The interface that any windows service should implement to be used
|
||||
/// with the GenericWindowsService executable.
|
||||
/// </summary>
|
||||
public interface IWindowsService : IDisposable
|
||||
{
|
||||
/// <summary>
|
||||
/// This method is called when the service gets a request to start.
|
||||
/// </summary>
|
||||
/// <param name="args">Any command line arguments</param>
|
||||
void OnStart(string[] args);
|
||||
|
||||
/// <summary>
|
||||
/// This method is called when the service gets a request to stop.
|
||||
/// </summary>
|
||||
void OnStop();
|
||||
|
||||
/// <summary>
|
||||
/// This method is called when a service gets a request to pause,
|
||||
/// but not stop completely.
|
||||
/// </summary>
|
||||
void OnPause();
|
||||
|
||||
/// <summary>
|
||||
/// This method is called when a service gets a request to resume
|
||||
/// after a pause is issued.
|
||||
/// </summary>
|
||||
void OnContinue();
|
||||
|
||||
/// <summary>
|
||||
/// This method is called when the machine the service is running on
|
||||
/// is being shutdown.
|
||||
/// </summary>
|
||||
void OnShutdown();
|
||||
|
||||
/// <summary>
|
||||
/// This method is called when a custom command is issued to the service.
|
||||
/// </summary>
|
||||
/// <param name="command">The command identifier to execute.</param >
|
||||
void OnCustomCommand(int command);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user