Exemplo n.º 1
0
 /// <summary>
 /// Adds handlers for EventRecords (thread safe)
 /// </summary>
 public void AddHandler(IEventRecordHandler handler)
 {
     handlersLock.EnterWriteLock();
     try
     {
         handlers.Add(handler);
     } finally
     {
         handlersLock.ExitWriteLock();
     }
 }
Exemplo n.º 2
0
 /// <summary>
 /// Removes handler for EventRecords (thread safe)
 /// </summary>
 public void RemoveHandler(IEventRecordHandler handler)
 {
     handlersLock.EnterWriteLock();
     try
     {
         handlers.Remove(handler);
     }
     finally
     {
         handlersLock.ExitWriteLock();
     }
 }