示例#1
0
 public static void UnregisterListener(ILoggerListener listener)
 {
     if (listener == null)
     {
         throw new ArgumentNullException(nameof(listener));
     }
     listener.Dispose();
     _listeners = _listeners.Remove(listener);
 }
示例#2
0
        public void RemoveListener(ILoggerListener listener)
        {
            if (listener == null)
            {
                throw new ArgumentNullException(nameof(listener));
            }

            lock (_sync)
            {
                listener.Dispose();
                // prevent marshal listener.
                _listeners.RemoveAll(l => listener.Equals(l));
            }
        }
示例#3
0
文件: Logger.cs 项目: yonglehou/docfx
 public static void UnregisterListener(ILoggerListener listener)
 {
     if (listener == null) throw new ArgumentNullException(nameof(listener));
     listener.Dispose();
     _listeners = _listeners.Remove(listener);
 }
示例#4
0
 public static void RemoveListener(ILoggerListener listener)
 {
     CheckInitialization();
     listener.Dispose();
     Instance._listeners.Remove(listener);
 }
示例#5
0
 public void Dispose()
 {
     _innerListener.Dispose();
 }