Ejemplo n.º 1
0
 public static void StopWorker()
 {
     if (_worker == null)
     {
         return;
     }
     if (HostingEnvironment.IsHosted)
     {
         HostingEnvironment.UnregisterObject(_worker);
     }
     _worker.Stop();
     _worker.Dispose(true);
     _worker = null;
 }