public ObjectSynchronizationContext GetContext <T>(ObjectSynchronizationHub <T> hub) where T : class, IObjectSynchronizationHubClient { lock (_lock) { ObjectSynchronizationContext syncManager; if (_syncManagers.TryGetValue(hub.GetType(), out syncManager)) { return(syncManager); } else { syncManager = new ObjectSynchronizationContext(hub); _syncManagers.Add(hub.GetType(), syncManager); return(syncManager); } } }
public ObjectSynchronizationClient(ObjectSynchronizationContext context, string connectionId) { _context = context; _connectionId = connectionId; }