예제 #1
0
        public void TestInitialize()
        {
            IApplicationContext ctx = new XmlApplicationContext(
                "assembly://Topics.Core.Messaging.InProcess.UnitTests/Topics.Core.Messaging.InProcess.UnitTests.Config/Messaging.xml");

            _topicBus = (ITopicBus)ctx.GetObject("DefaultTopicBus");
        }
예제 #2
0
 public StoreService(IProductService productService, IAreaService areaService,
                     ITopicBus topicBus)
 {
     _productService = productService;
     _areaService    = areaService;
     _topicBus       = topicBus;
 }
예제 #3
0
 public ProductService(IHttpClientFactory httpClientFactory,
                       IMemoryCache memoryCache,
                       ITopicBus topicBus)
 {
     _httpClientFactory = httpClientFactory;
     _memoryCache       = memoryCache;
     _topicBus          = topicBus;
 }
예제 #4
0
        public DynamicTopicBus(string topicBusName)
        {
            _topicBusName = topicBusName;

            _topicBus = TopicBusRegistry.GetTopicBus(topicBusName);
            if (_topicBus == null)
            {
                _topicBus = TopicBusRegistry.GetDefaultTopicBus();
            }
        }
예제 #5
0
 public ReceiverBus(
     IProductService product,
     IAreaService area,
     ITopicBus topicBus,
     IOptions <ServiceBusOption> option)
 {
     _product  = product;
     _area     = area;
     _option   = option.Value;
     _topicBus = topicBus;
     _rule     = new RuleDescription
     {
         Filter = new CorrelationFilter {
             Label = _option.ServiceBus.Store
         },
         Name = "filter-store"
     };
 }
예제 #6
0
 public StoreController(IStoreService storeService,
                        ITopicBus topicBus)
 {
     _storeService = storeService;
     _topicBus     = topicBus;
 }
 public IMessageListener CreateMessageListener(string queueName, Delegate messageHandler, IMessageConverter messageConverter, ITopicBus responseTopicBus)
 {
     return(new ActionMessageListenerAdapter()
     {
         MessageHandler = messageHandler,
         MessageConverter = messageConverter,
         QueueName = queueName,
         ResponseTopicBus = responseTopicBus,
         MessageListenerStatus = MessageListenerStatuses.Created,
         MessageBodyNativeType = (messageHandler.GetType()).GenericTypeArguments[0].AssemblyQualifiedName
     });
 }
예제 #8
0
 public ProductController(IProductService productService, IMapper mapper, ITopicBus topicBus)
 {
     _productService = productService;
     _mapper         = mapper;
     _topicBus       = topicBus;
 }
예제 #9
0
 public ProductionController(IAreaService areaService, IMapper mapper, ITopicBus topicBus)
 {
     _areaService = areaService;
     _mapper      = mapper;
     _topicBus    = topicBus;
 }