public virtual void UnregisterListener(ListenerBase listener) { semaphoreSlim.Wait(); if (!_listeners.Contains(listener)) { _listeners.Remove(listener); listener.Engine = null; InternalTrace(Entry.CreateInfo(string.Format("Listener '{0}' unregistered", listener.Name))); } semaphoreSlim.Release(); }
public virtual void RegisterListener(ListenerBase listener) { semaphoreSlim.Wait(); if (!_listeners.Contains(listener)) { listener.Engine = this; _listeners.Add(listener); listener.DumpEnabled = DumpEnabled; InternalTrace(Entry.CreateInfo(string.Format("Listener '{0}' registered", listener.Name))); } semaphoreSlim.Release(); }