Ejemplo n.º 1
0
 /// <summary>
 /// 释放占用的资源。
 /// </summary>
 /// <param name="disposing"></param>
 protected virtual void Dispose(bool disposing)
 {
     if (this == _empty)
     {
         return;
     }
     if (!disposing)
     {
         return;
     }
     if (_disposed)
     {
         return;
     }
     _name = null;
     if (_levels != null)
     {
         _levels.Clear();
         _levels = null;
     }
     GC.SuppressFinalize(this);
     _disposed = true;
 }
Ejemplo n.º 2
0
 /// <summary>
 /// 创建LogRepository实例。
 /// </summary>
 /// <param name="name">名称,不能包含无效文件名字符。</param>
 public LogBase(string name)
 {
     Name    = name;
     _levels = new Symbol.Collections.Generic.HashSet <string>(StringComparer.OrdinalIgnoreCase);
 }