示例#1
0
 /// <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);
     }
 }
示例#2
0
 /// <summary>
 /// Remove client handle from handle list
 /// </summary>
 /// <param name="signalRClient"></param>
 private void Dispose(SignalRRegistrarHandle signalRClient)
 {
     lock (_handles) {
         _handles.Remove(signalRClient);
     }
 }