예제 #1
0
 public Service()
 {
     try
     {
         InitializeComponent();
         _vaultScanner = new VaultScanner();
         _workerThread = new Thread(_vaultScanner.StartScan);
     }
     catch (Exception e)
     {
         Log.Fatal("Failed to start service", e);
         throw e;
     }
 }
예제 #2
0
 public Service()
 {
     try
     {
         InitializeComponent();
         _vaultScanner = new VaultScanner();
         _workerThread = new Thread(_vaultScanner.StartScan);
     }
     catch (Exception e)
     {
         Log.Fatal("Failed to start service", e);
         throw e;
     }
 }
예제 #3
0
 public static void Main(String[] args)
 {
     InitializeCommon();
     if (args.Count() == 0)
     {
         Log.Info("Starting service");
         ServiceBase[] ServicesToRun;
         ServicesToRun = new ServiceBase[] { new Service() };
         ServiceBase.Run(ServicesToRun);
     }
     else
     {
         Log.Info("Starting");
         VaultScanner _vaultScanner = new VaultScanner();
         _vaultScanner.StartScan();
     }
 }
예제 #4
0
 public static void Main(String[] args)
 {
     InitializeCommon();
     if (args.Count() == 0)
     {
         Log.Info("Starting service");
         ServiceBase[] ServicesToRun;
         ServicesToRun = new ServiceBase[] { new Service() };
         ServiceBase.Run(ServicesToRun);
     }
     else
     {
         Log.Info("Starting");
         VaultScanner _vaultScanner = new VaultScanner();
         _vaultScanner.StartScan();
     }
 }