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(); } }
static Hub() { HeartbeatEvent = new HeartbeatEvent { _Transform = false }; // Initialize the singleton instance. Instance = new Hub(); }
static Hub() { Instance = new Hub(); }