void Owner_LoggerCreated(object sender, LoggerEventArgs e) { lock(_lock) { foreach (var target in ((ILoggerQuery)e.Logger).GetTargets()) { if (target is ILazyFlushable && !(this.Clients.Contains((ILazyFlushable)target))) this.Clients.Add((ILazyFlushable)target); } } }
void Owner_LoggerCreated(object sender, LoggerEventArgs e) { lock (_lock) { foreach (var target in ((ILoggerQuery)e.Logger).GetTargets()) { if (target is ILazyFlushable && !(this.Clients.Contains((ILazyFlushable)target))) { this.Clients.Add((ILazyFlushable)target); } } } }