예제 #1
0
 //start the windows service
 protected override void OnStart(string[] args)
 {
     if (server != null && server.IsRunning)
     {
         server.Stop();
     }
     server = new Server();
     server.Start();
 }
예제 #2
0
 static void Main(string[] args)
 {
     try
     {
         Server server = new Server();
         server.Start();
         Console.WriteLine("AudioService OK");
     }
     catch (Exception ex)
     {
         Console.WriteLine(ex.Message);
     }
     Console.ReadLine();
 }