示例#1
0
 public AtlasPublisher(IMqService mqService, IInputService input,
                       ILogger <AtlasPublisher> logger)
 {
     _mqService = mqService;
     _input     = input;
     _logger    = logger;
 }
示例#2
0
        public void Setup()
        {
            var ass    = Assembly.GetExecutingAssembly();
            var stream = ass.GetManifestResourceStream(ass.GetManifestResourceNames()[0]);
            var config = XDocument.Load(stream);

            var rabbitConn = config.Root.Element("connectionStrings").Element("add").Attribute("connectionString").Value;

            mqService = new MqService(rabbitConn);
        }
示例#3
0
 public UserHandler(IAtlasConsumer consumer, ITimerService timer, IAtlasPublisher publisher, IMqService mqService,
                    IConfigService config, ILogger <UserHandler> logger)
 {
     _consumer  = consumer;
     _timer     = timer;
     _publisher = publisher;
     _config    = config;
     _mqService = mqService;
     _logger    = logger;
 }
 public OrderCancelledDomainEventHandler(ILoggerFactory logger,
                                         IMqService eventBus,
                                         IRepository <Order> orderRepository,
                                         IRepository <Buyer> buyerRepository)
 {
     _logger          = logger;
     _eventBus        = eventBus;
     _orderRepository = orderRepository;
     _buyerRepository = buyerRepository;
 }
示例#5
0
 public MqManager(IMqService service, QueueInfo queueInfo)
 {
     mqService = service;
     //_queueInfo = queueInfo;
     exchangesQueues = new List <MqQueueInfo>();
     foreach (var queue in queueInfo.Queues)
     {
         exchangesQueues.Add(new MqQueueInfo {
             ExchangeName = queueInfo.ExchangeName, RoutingKey = queue, QueueName = queue
         });
     }
     RefreshQueuesInfo();
 }
示例#6
0
 public MqNotificationService(
     RabbitMqConfiguration mqConfig,
     IMqService mqService,
     ModuleConfiguration configuration,
     ILogger logger,
     INotificationHelper helper)
 {
     this.notificationConfig = configuration.Notifications;
     this.mqConfig           = mqConfig;
     this.mqService          = mqService;
     this.logger             = logger;
     this.helper             = helper;
 }
 public HostInfoConsumer(IMqService service)
 {
     _service = service;
 }
 // dependency injection ctor
 protected MqController(IMqService mqService)
 {
     MqService = mqService;
 }
 // default ctor
 protected MqController()
 {
     MqService = Services.Singleton.MqService.GetInstance();
 }
示例#10
0
 /// <summary>
 /// 添加服务
 /// </summary>
 /// <param name="mqService"></param>
 public void AddService(IMqService mqService)
 {
     Services.Add(mqService);
 }
示例#11
0
 public MqController(IMqService mqService)
 {
     _mqService = mqService;
 }
 // dependency injection ctor
 public OrdersController(IMqService mqService)
 {
     MqService = mqService;
 }
示例#13
0
 public AtlasConsumer(IMqService mqService, IOutputService output, ILogger <AtlasConsumer> logger)
 {
     _mqService = mqService;
     _output    = output;
     _logger    = logger;
 }