/// <summary> /// Initializes a new <see cref="FilteringSink"/> that wraps the specified /// <paramref name="inner"/> sink and only forwards events that match the supplied /// <paramref name="specification"/> /// </summary> /// <param name="inner">The event sink to wrap</param> /// <param name="specification">The specification that identifies the events that should /// be forwarded to the wrapped sink</param> public FilteringSink(IDiagnosticEventSink inner, IDiagnosticEventSpecification specification) { Inner = inner ?? throw new ArgumentNullException(nameof(inner)); _specification = specification ?? throw new ArgumentNullException(nameof(specification)); }
protected async Task WhenInitializingSink() { var factory = new DiagnosticEventSinkFactory(DiagnosticService.DefaultInstance); Sink = await factory.InitDiagnosticEventSink(Configuration); }
/// <summary> /// Initializes a new <see cref="DiagnosticSinkExceptionEventArgs"/> /// </summary> /// <param name="diagnosticEvent">The event being handled</param> /// <param name="diagnosticEventSink">The data sink from which the exception was thrown</param> /// <param name="exception">The unhandled exception</param> public DiagnosticSinkExceptionEventArgs(DiagnosticEvent diagnosticEvent, IDiagnosticEventSink diagnosticEventSink, Exception exception) { DiagnosticEvent = diagnosticEvent; DiagnosticEventSink = diagnosticEventSink; Exception = exception; }