Exemple #1
0
 private static void RunApplication(TaskManager taskManager, ServiceSection serviceConfiguration)
 {
     HostFactory.Run(
         x =>
         {
             x.Service<ApplicationController>(
                 s =>
                 {
                     s.ConstructUsing(name => new ApplicationController(taskManager, log));
                     s.WhenStarted(tc => tc.Start());
                     s.WhenStopped(tc => tc.Stop());
                 });
             x.RunAsLocalSystem();
             x.SetDescription(serviceConfiguration.Description);
             x.SetDisplayName(serviceConfiguration.Name);
             x.SetServiceName(serviceConfiguration.Name);
         });
 }
Exemple #2
0
 private static void RunApplication(TaskManager taskManager, ServiceSection serviceConfiguration)
 {
     HostFactory.Run(
         x =>
     {
         x.Service <ApplicationController>(
             s =>
         {
             s.ConstructUsing(name => new ApplicationController(taskManager, log));
             s.WhenStarted(tc => tc.Start());
             s.WhenStopped(tc => tc.Stop());
         });
         x.RunAsLocalSystem();
         x.SetDescription(serviceConfiguration.Description);
         x.SetDisplayName(serviceConfiguration.Name);
         x.SetServiceName(serviceConfiguration.Name);
     });
 }