public void Handle(GrandOutputEventInfo logEvent, bool sendToCommonSink) { if (sendToCommonSink) { _dispatcher.Add(logEvent, _receiver); } else { _dispatcher.Add(logEvent, _receiverNoCommonSink); } }
void IGrandOutputSink.Handle( GrandOutputEventInfo logEvent, bool parrallelCall ) { var sinks = _sinks; if( sinks != null ) { foreach( var l in sinks ) { try { l.Handle( logEvent, parrallelCall ); } catch( Exception exCall ) { ActivityMonitor.CriticalErrorCollector.Add( exCall, l.GetType().FullName ); Util.InterlockedRemove( ref _sinks, l ); } } } }
void IGrandOutputSink.Handle(GrandOutputEventInfo logEvent, bool parrallelCall) { var sinks = _sinks; if (sinks != null) { foreach (var l in sinks) { try { l.Handle(logEvent, parrallelCall); } catch (Exception exCall) { ActivityMonitor.CriticalErrorCollector.Add(exCall, l.GetType().FullName); Util.InterlockedRemove(ref _sinks, l); } } } }
public void Handle( GrandOutputEventInfo logEvent, bool sendToCommonSink ) { if( sendToCommonSink ) _dispatcher.Add( logEvent, _receiver ); else _dispatcher.Add( logEvent, _receiverNoCommonSink ); }