예제 #1
0
 public EntityToEtoMapper(
     IOptions <DistributedEventBusOptions> options,
     IObjectMapper objectMapper)
 {
     ObjectMapper = objectMapper;
     Options      = options.Value;
 }
예제 #2
0
 public EntityToEtoMapper(
     IOptions <DistributedEventBusOptions> options,
     IHybridServiceScopeFactory hybridServiceScopeFactory)
 {
     HybridServiceScopeFactory = hybridServiceScopeFactory;
     Options = options.Value;
 }
        public RabbitMqDistributedEventBus(
            IOptions <RabbitMqDistributedEventBusOptions> options,
            IConnectionPool connectionPool,
            IRabbitMqSerializer serializer,
            IServiceProvider serviceProvider,
            DistributedEventBusOptions distributedEventBusOptions)
        {
            ConnectionPool                     = connectionPool;
            Serializer                         = serializer;
            ServiceProvider                    = serviceProvider;
            DistributedEventBusOptions         = distributedEventBusOptions;
            RabbitMqDistributedEventBusOptions = options.Value;

            HandlerFactories = new ConcurrentDictionary <Type, List <IEventHandlerFactory> >();
            EventTypes       = new ConcurrentDictionary <string, Type>();

            ConsumerChannel = CreateConsumerChannel();
            Subscribe(DistributedEventBusOptions.Handlers);
        }