Beispiel #1
0
 public static ApiManager GetContext()
 {
     lock (Locker)
     {
         return current ?? (current = new ApiManager());
     }
 }
Beispiel #2
0
 public void Stop()
 {
     Log.Info("Stopping");
     Server.CloseAsync().Wait();
     Server.Dispose();
     lock(Locker)
         current = null;
     Log.Info("Stopped");
 }