public LoggingEventHandlerDecorator(IEventHandler <TEvent> handler, ICorrelationIdFactory correlationIdFactory, ILogger <IEventHandler <TEvent> > logger) { _handler = handler; _correlationIdFactory = correlationIdFactory; _logger = logger; }
public CorrelateOutgoingMessageStep(ICorrelationContextAccessor correlationContextAccessor, ICorrelationIdFactory correlationIdFactory, IRebusLoggerFactory rebusLoggerFactory) { _correlationContextAccessor = correlationContextAccessor ?? throw new ArgumentNullException(nameof(correlationContextAccessor)); _correlationIdFactory = correlationIdFactory ?? throw new ArgumentNullException(nameof(correlationIdFactory)); _logger = (rebusLoggerFactory ?? new NullLoggerFactory()).GetLogger <CorrelateOutgoingMessageStep>(); }
public LoggingCommandHandlerDecorator(ICommandHandler <TCommand> handler, ICorrelationIdFactory correlationIdFactory, ILogger <ICommandHandler <TCommand> > logger) { _handler = handler; _correlationIdFactory = correlationIdFactory; _logger = logger; }
public TracingCommandHandlerDecorator(ICommandHandler <TCommand> handler, ITracer tracer, ICorrelationIdFactory correlationIdFactory) { _handler = handler; _tracer = tracer; _correlationIdFactory = correlationIdFactory; }
public CorrelationManager( ICorrelationContextFactory correlationContextFactory, ICorrelationIdFactory correlationIdFactory, ILogger <CorrelationManager> logger, DiagnosticListener diagnosticListener ) : this(correlationContextFactory, correlationIdFactory, logger) { _diagnosticListener = diagnosticListener ?? throw new ArgumentNullException(nameof(diagnosticListener)); }
public CorrelationManager ( ICorrelationContextFactory correlationContextFactory, ICorrelationIdFactory correlationIdFactory, ILogger <CorrelationManager> logger ) { _correlationContextFactory = correlationContextFactory ?? throw new ArgumentNullException(nameof(correlationContextFactory)); _correlationIdFactory = correlationIdFactory ?? throw new ArgumentNullException(nameof(correlationIdFactory)); _logger = logger ?? throw new ArgumentNullException(nameof(logger)); }
public void When_creating_instance_without_correlationIdFactory_it_should_throw() { ICorrelationIdFactory correlationIdFactory = null; // ReSharper disable once ExpressionIsAlwaysNull // ReSharper disable once ObjectCreationAsStatement Action act = () => new CorrelateOutgoingMessageStep(_correlationContextAccessor, correlationIdFactory, new NullLoggerFactory()); // Assert act.Should() .Throw <ArgumentNullException>() .Where(exception => exception.ParamName == nameof(correlationIdFactory)); }
public MessageBroker(IBusPublisher busPublisher, IMessageOutbox outbox, ICorrelationContextAccessor contextAccessor, IHttpContextAccessor httpContextAccessor, IMessagePropertiesAccessor messagePropertiesAccessor, ICorrelationIdFactory correlationIdFactory, RabbitMqOptions options, ILogger <IMessageBroker> logger) { _busPublisher = busPublisher; _outbox = outbox; _contextAccessor = contextAccessor; _httpContextAccessor = httpContextAccessor; _messagePropertiesAccessor = messagePropertiesAccessor; _correlationIdFactory = correlationIdFactory; _logger = logger; _spanContextHeader = string.IsNullOrWhiteSpace(options.SpanContextHeader) ? DefaultSpanContextHeader : options.SpanContextHeader; }
public MBHttpClient(HttpClient client, HttpClientOptions options, ICorrelationContextFactory correlationContextFactory, ICorrelationIdFactory correlationIdFactory) { _client = client; _options = options; if (!string.IsNullOrWhiteSpace(_options.CorrelationContextHeader)) { var correlationContext = correlationContextFactory.Create(); _client.DefaultRequestHeaders.TryAddWithoutValidation(_options.CorrelationContextHeader, correlationContext); } if (!string.IsNullOrWhiteSpace(_options.CorrelationIdHeader)) { var correlationId = correlationIdFactory.Create(); _client.DefaultRequestHeaders.TryAddWithoutValidation(_options.CorrelationIdHeader, correlationId); } }
public FabioHttpClient(HttpClient client, HttpClientOptions options, IHttpClientSerializer serializer, ICorrelationContextFactory correlationContextFactory, ICorrelationIdFactory correlationIdFactory) : base(client, options, serializer, correlationContextFactory, correlationIdFactory) { }
public LoggingCommandHandlerDecorator(ICommandHandler <TCommand> handler, ICorrelationIdFactory correlationIdFactory) { _handler = handler; _correlationIdFactory = correlationIdFactory; }
public LogContextMiddleware(ICorrelationIdFactory correlationIdFactory) { _correlationIdFactory = correlationIdFactory; }
/// <summary> /// Initializes a new instance of the <see cref="GenerateMessageHeaders" /> class. /// </summary> /// <param name="correlationIdFactory">The correlation identifier factory.</param> public GenerateMessageHeaders(ICorrelationIdFactory correlationIdFactory) { Guard.NotNull(() => correlationIdFactory, correlationIdFactory); _correlationIdFactory = correlationIdFactory; }
public ConsulHttpClient(HttpClient client, HttpClientOptions options, ICorrelationContextFactory correlationContextFactory, ICorrelationIdFactory correlationIdFactory) : base(client, options, correlationContextFactory, correlationIdFactory) { }
public LoggingEventHandlerDecorator(IEventHandler <TEvent> handler, ICorrelationIdFactory correlationIdFactory) { _handler = handler; _correlationIdFactory = correlationIdFactory; }