Ejemplo n.º 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");
        }
Ejemplo n.º 2
0
 public StoreService(IProductService productService, IAreaService areaService,
                     ITopicBus topicBus)
 {
     _productService = productService;
     _areaService    = areaService;
     _topicBus       = topicBus;
 }
Ejemplo n.º 3
0
 public ProductService(IHttpClientFactory httpClientFactory,
                       IMemoryCache memoryCache,
                       ITopicBus topicBus)
 {
     _httpClientFactory = httpClientFactory;
     _memoryCache       = memoryCache;
     _topicBus          = topicBus;
 }
Ejemplo n.º 4
0
        public DynamicTopicBus(string topicBusName)
        {
            _topicBusName = topicBusName;

            _topicBus = TopicBusRegistry.GetTopicBus(topicBusName);
            if (_topicBus == null)
            {
                _topicBus = TopicBusRegistry.GetDefaultTopicBus();
            }
        }
Ejemplo n.º 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"
     };
 }
Ejemplo n.º 6
0
 public StoreController(IStoreService storeService,
                        ITopicBus topicBus)
 {
     _storeService = storeService;
     _topicBus     = topicBus;
 }
Ejemplo n.º 7
0
 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
     });
 }
Ejemplo n.º 8
0
 public ProductController(IProductService productService, IMapper mapper, ITopicBus topicBus)
 {
     _productService = productService;
     _mapper         = mapper;
     _topicBus       = topicBus;
 }
Ejemplo n.º 9
0
 public ProductionController(IAreaService areaService, IMapper mapper, ITopicBus topicBus)
 {
     _areaService = areaService;
     _mapper      = mapper;
     _topicBus    = topicBus;
 }