public static void detatch(ILogListener listener) { lock (_lock) { int count = _listeners.Count; LogLevel minLevel = LogLevel.MAX; int i = 0; while (i < count) { ILogListener l = _listeners[i]; if (l == listener) { _listeners.RemoveAt(i); } else { minLevel = l.minLevel < minLevel ? l.minLevel : minLevel; i++; } } _minLevel = minLevel; } listener.Dispose(); }
public void UnregisterListener(ILogListener listener) { Helpers.Argument.ValidateIsNotNull(listener, "listener"); lock (_lock) { _listeners.Remove(listener); listener.Dispose(); } }
public void Dispose() { _inner.Dispose(); }