Beispiel #1
0
 private void AllObservers(Action <IObserver <T> > action)
 {
     using (_observersLock.BeginReadLock())
         foreach (var o in _observers)
         {
             action(o);
         }
 }
Beispiel #2
0
 /// <summary>
 /// Returns <c>true</c> if the set contains this endpoint.
 /// </summary>
 /// <param name="item"></param>
 /// <returns></returns>
 public bool Contains(IKProtocolEndpoint <TNodeId> item)
 {
     using (sync.BeginReadLock())
         return(set.Contains(item));
 }