Beispiel #1
0
 public EventBus
 (
     IMessageBuilder messageBuilder,
     ISubscriptionsRegistry subscriptionsRegistry,
     ITopology topology,
     ILogger logger
 )
 {
     _messageBuilder        = messageBuilder;
     _subscriptionsRegistry = subscriptionsRegistry;
     _topology = topology;
     _logger   = logger;
 }
Beispiel #2
0
 public Subscription(
     ISubscriptionsRegistry registry,
     ISerializer serializer,
     ILogger logger,
     IEndpoint endpoint,
     Func <TMessage, Message, Task <bool> > handler
     )
 {
     Id          = Guid.NewGuid();
     _registry   = registry;
     _serializer = serializer;
     _logger     = logger;
     Endpoint    = endpoint;
     _handler    = (iMessage, message) => this.Handle(iMessage, message, handler);
 }
Beispiel #3
0
 public CommandBus
 (
     IMessageBuilder messageBuilder,
     ISubscriptionsRegistry subscriptionsRegistry,
     ITopology topology,
     ILogger logger,
     HostContext hostContext
 )
 {
     _messageBuilder        = messageBuilder;
     _subscriptionsRegistry = subscriptionsRegistry;
     _topology    = topology;
     _logger      = logger;
     _hostContext = hostContext;
 }
Beispiel #4
0
 public ResponseAwaiter(Guid correlationId, ISubscriptionsRegistry subscriptionsRegistry, IEndpoint responseEndpoint)
 {
     _correlationId         = correlationId;
     _subscriptionsRegistry = subscriptionsRegistry;
     _responseEndpoint      = responseEndpoint;
 }