pass ServiceDescriptor when creating wrapperservice

pull/254/head
Gerald Senarclens de Grancy 2017-10-30 13:36:17 +01:00
parent f69ed72e9b
commit f4da4bb8a8
1 changed files with 3 additions and 3 deletions

View File

@ -731,7 +731,7 @@ namespace winsw
} }
if (args[0] == "test") if (args[0] == "test")
{ {
WrapperService wsvc = new WrapperService(); WrapperService wsvc = new WrapperService(d);
wsvc.OnStart(args.ToArray()); wsvc.OnStart(args.ToArray());
Thread.Sleep(1000); Thread.Sleep(1000);
wsvc.OnStop(); wsvc.OnStop();
@ -739,7 +739,7 @@ namespace winsw
} }
if (args[0] == "testwait") if (args[0] == "testwait")
{ {
WrapperService wsvc = new WrapperService(); WrapperService wsvc = new WrapperService(d);
wsvc.OnStart(args.ToArray()); wsvc.OnStart(args.ToArray());
Console.WriteLine("Press any key to stop the service..."); Console.WriteLine("Press any key to stop the service...");
Console.Read(); Console.Read();
@ -767,7 +767,7 @@ namespace winsw
{ {
Log.Info("Starting ServiceWrapper in the service mode"); Log.Info("Starting ServiceWrapper in the service mode");
} }
Run(new WrapperService()); Run(new WrapperService(d));
} }
private static void InitLoggers(ServiceDescriptor d, bool enableCLILogging) private static void InitLoggers(ServiceDescriptor d, bool enableCLILogging)