示例#1
0
        public void OnEventLogged(object sender, LogEventArgs e)
        {
            lock (List)
                List.Add(e.LogEntry);

            lock (ChainedTargets)
                ChainedTargets.ForEach(target => target.OnEventLogged(sender, e));
        }
示例#2
0
 public void Unchain(ILogTarget target)
 {
     lock (ChainedTargets)
         ChainedTargets.Remove(target);
 }
示例#3
0
 public void Chain(ILogTarget target)
 {
     lock (ChainedTargets)
         ChainedTargets.Add(target);
 }