Exemplo n.º 1
0
 public Service()
 {
     try
     {
         InitializeComponent();
         wsr = new Router();
         workerThread = new Thread(wsr.Start);
     }
     catch (Exception e)
     {
         Log.Fatal("Failed to start service", e);
         throw e;
     }
 }
Exemplo n.º 2
0
 public static void Main(String[] args)
 {            
     if (args.Count() == 0) {
         Log.Info("Starting service");
         ServiceBase[] ServicesToRun;
         ServicesToRun = new ServiceBase[] { new Service() };
         ServiceBase.Run(ServicesToRun);  
     }
     else {
         Log.Info("Starting");
         Router wsr = new Router();
         wsr.Start();
     } 
 }