Exemplo n.º 1
0
        /// <inheritdoc cref="ContextualDiagnosticReceiver{T}(ContextualDirectReportAction{T}, in T)"/>
        public ContextualDiagnosticReceiver(ContextualDirectReportAction <T> action)
        {
            if (action is null)
            {
                throw new ArgumentNullException(nameof(action));
            }

            _action = action;
        }
Exemplo n.º 2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ContextualDiagnosticReceiver{T}"/> class.
 /// </summary>
 /// <param name="action"><see cref="ContextualDirectReportAction{T}"/> to be performed when the <see cref="ReportDiagnostic(Diagnostic)"/> method is called.</param>
 /// <param name="context">Context of this <see cref="ContextualDiagnosticReceiver{T}"/>.</param>
 /// <exception cref="ArgumentNullException"><paramref name="action"/> is <see langword="null"/>.</exception>
 public ContextualDiagnosticReceiver(ContextualDirectReportAction <T> action, in T context)