using System; using System.Xml; namespace winsw.Extensions { /// /// Interface for Win Service Wrapper Extension /// /// /// All implementations should provide the default empty constructor. /// The initialization will be performed by Init methods. /// Binary comparibility of the class is not guaranteed in WinSW 2. /// public interface IWinSWExtension { /// /// Extension name to be displayed in logs /// String DisplayName { get; } /// /// Extension descriptor /// WinSWExtensionDescriptor Descriptor { get; set; } /// /// Init handler. Extension should load it's config during that step /// /// Service descriptor /// Configuration node void Configure(ServiceDescriptor descriptor, XmlNode node); /// /// Start handler. Called during startup of the service before the child process. /// /// Logger /// Any error during execution void OnWrapperStarted(); /// /// Handler, which is being invoked once the child process is started. /// /// Process /// Logger /// Any error during execution void OnProcessStarted(System.Diagnostics.Process process); /// /// Handler, which is being invoked once the child process is terminated. /// /// Process /// Logger /// Any error during execution void OnProcessTerminated(System.Diagnostics.Process process); /// /// Stop handler. Called during stop of the service /// /// Logger /// Any error during execution void BeforeWrapperStopped(); } }