/// <summary> /// Get a new handle /// </summary> /// <returns></returns> internal ICallbackRegistrar GetHandle() { lock (_handles) { if (_disposed) { throw new ObjectDisposedException(nameof(SignalRClientRegistrar)); } var handle = new SignalRRegistrarHandle(this); _handles.Add(handle); return(handle); } }
/// <summary> /// Remove client handle from handle list /// </summary> /// <param name="signalRClient"></param> private void Dispose(SignalRRegistrarHandle signalRClient) { lock (_handles) { _handles.Remove(signalRClient); } }