Beispiel #1
0
 public Hub Create(string name)
 {
     rwlock.EnterWriteLock();
     try
     {
         Hub hub;
         if (!hubs.TryGetValue(name, out hub))
         {
             hub = new Hub(name);
             hubs.Add(name, hub);
         }
         return hub;
     }
     finally
     {
         rwlock.ExitWriteLock();
     }
 }
Beispiel #2
0
 static Hub()
 {
     HeartbeatEvent = new HeartbeatEvent { _Transform = false };
     // Initialize the singleton instance.
     Instance = new Hub();
 }
Beispiel #3
0
 static Hub()
 {
     Instance = new Hub();
 }