Пример #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="InMemoryEventBus"/> class.
        /// </summary>
        /// <param name="loggerFactory">The logger factory.</param>
        /// <param name="subscriptionErrorHandler">The subscription error handler. If null the default one will be used</param>
        public InMemoryEventBus(ILoggerFactory loggerFactory, ISubscriptionErrorHandler subscriptionErrorHandler)
        {
            Guard.NotNull(loggerFactory, nameof(loggerFactory));

            this.logger = loggerFactory.CreateLogger(this.GetType().FullName);
            this.subscriptionErrorHandler = subscriptionErrorHandler ?? new DefaultSubscriptionErrorHandler(loggerFactory);
            this.subscriptions            = new Dictionary <Type, List <ISubscription> >();
        }
Пример #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="InMemoryEventBus"/> class.
 /// </summary>
 /// <param name="loggerFactory">The logger factory.</param>
 /// <param name="subscriptionErrorHandler">The subscription error handler. If null the default one will be used</param>
 public InMemoryEventBus(ILogger <InMemoryEventBus> logger, ISubscriptionErrorHandler subscriptionErrorHandler)
 {
     this.logger = logger;
     this.subscriptionErrorHandler = subscriptionErrorHandler;
     this.subscriptions            = new Dictionary <Type, List <ISubscription> >();
 }
Пример #3
0
 public Signals(ILoggerFactory loggerFactory, ISubscriptionErrorHandler subscriptionErrorHandler) : base(loggerFactory, subscriptionErrorHandler)
 {
 }