Пример #1
0
        public RabbitMqWrapperSubscriberTests()
        {
            rabbitServer = new RabbitServer();
            var connectionFactory = new FakeConnectionFactory(rabbitServer);
            var logger            = Substitute.For <ILogger <RabbitSubscriber> >();
            var connection        = connectionFactory.CreateConnection();

            channel = connection.CreateModel();

            sut = new RabbitSubscriber(connectionFactory, logger);
        }
 public LimitOrdersSubscriberForPublishing(
     ILog log,
     ITradesConverter tradesConverter,
     ITradesPublisher tradesPublisher,
     IRabbitSubscriber rabbitMqSubscribe,
     string connectionString,
     string exchangeName)
 {
     _log               = log;
     _tradesConverter   = tradesConverter;
     _tradesPublisher   = tradesPublisher;
     _rabbitMqSubscribe = rabbitMqSubscribe;
     _connectionString  = connectionString;
     _exchangeName      = exchangeName;
 }
 public LimitOrdersSubscriberForCache(
     ILog log,
     ITradesConverter tradesConverter,
     ICacheOfCaches cache,
     IRabbitSubscriber rabbitMqSubscribe,
     string connectionString,
     string exchangeName)
 {
     _log               = log;
     _cache             = cache;
     _tradesConverter   = tradesConverter;
     _rabbitMqSubscribe = rabbitMqSubscribe;
     _connectionString  = connectionString;
     _exchangeName      = exchangeName;
 }
Пример #4
0
 public LimitOrdersSubscriberForDb(
     ILog log,
     ITradesConverter tradesConverter,
     ITradesLogRepository tradesLogRepository,
     IRabbitSubscriber rabbitMqSubscribe,
     string connectionString,
     string exchangeName)
 {
     _log                 = log;
     _tradesConverter     = tradesConverter;
     _tradesLogRepository = tradesLogRepository;
     _rabbitMqSubscribe   = rabbitMqSubscribe;
     _connectionString    = connectionString;
     _exchangeName        = exchangeName;
 }
Пример #5
0
 public HomeController(IRabbitSubscriber rabbitHandler)
 {
     _rabbitHandler = rabbitHandler;
     _rabbitHandler.subscribe("CreateRoom");
 }
Пример #6
0
 public Processor(IRabbitSubscriber rabbitWrapper, IOptions <List <RabbitSubscriberConfiguration> > options, ILogger <Processor> logger)
 {
     this.rabbitWrapper = rabbitWrapper;
     this.options       = options.Value;
     this.logger        = logger;
 }
 public ShutdownManager(ILog log, IRabbitSubscriber rabbitSubscriber)
 {
     _rabbitSubscriber = rabbitSubscriber;
     _log = log;
 }
Пример #8
0
 public RoomController(IRabbitSubscriber rabbitSubscriber)
 {
     _rabbitSubscriber = rabbitSubscriber;
     _rabbitSubscriber.subscribe("CreateChatMessage");
     _rabbitSubscriber.subscribe("CreateQuestion");
 }