Ejemplo n.º 1
0
 /// <summary>
 /// Executes when a Start command is sent to the service by the Service Control Manager (SCM) or when the operating system starts (for a service that starts automatically). Specifies actions to take when the service starts.
 /// </summary>
 /// <param name="args">Data passed by the start command.</param>
 protected override void OnStart(string[] args)
 {
     Thread.Sleep(50000);
     controller = new HostingServiceController((ServiceSectionHandler)ConfigurationManager.GetSection("service"));
     controller.Start();
     //this.watcher.EnableRaisingEvents = true;
     //this.StartDiagnosticService();
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="DiagnosticService"/> class.
 /// </summary>
 /// <param name="modules">The of hosting service modules.</param>
 /// <param name="host">The hosting service controller.</param>
 public DiagnosticService(ICollection <ExternalModule> modules, HostingServiceController host)
 {
     this.modules = modules;
     this.host    = host;
 }