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