示例#1
0
 public OrderController(IShowDisplayService showDisplayService)
 {
     orderToGet = new OrderToGet()
     {
         OrderId = new Guid("2840b416-6bef-48fc-ac64-0db3df117955"), StoreId = new Guid("2840b416-6bef-48fc-ac64-0db3df117955"), Total = 37.23M
     };                                                                                                                                                                        //_mapper.Map<FaceToGet>(face);
     _showDisplayService = showDisplayService;
 }
示例#2
0
 public ReceiveMessagesFactory(IHubContext <MessageHub> hubContext, ILogger <ReceiveMessagesService> logger, IShowDisplayService showDisplayService, ILogService logService, IMetodosApi metodosApi)
 {
     _hubContext         = hubContext;
     _logger             = logger;
     _showDisplayService = showDisplayService;
     _logService         = logService;
     _metodosApi         = metodosApi;
     //By default, creates this receivemessageservice
     CreateNew(Topics.storecatalogready.ToString(), "UI");
     CreateNew(Topics.userretrieved.ToString(), "UI");
     //CreateNew("orderpaid", "html", "filter-store", "8048e9ec-80fe-4bad-bc2a-e4f4a75c834e");
 }
示例#3
0
        /*
         * private Task _lastTask;
         * private readonly List<Message> _messages;
         */

        public ReceiveMessagesService(IHubContext <MessageHub> hubContext, ILogger <ReceiveMessagesService> logger, IShowDisplayService showDisplayService, ILogService logService, IMetodosApi metodosApi,
                                      string topic, string subscription, string filterName = null, string filter = null)
        {
            _logger             = logger;     //TODO ver se faz sentido remover este log
            _logService         = logService; //log no servicebus
            _hubContext         = hubContext;
            _showDisplayService = showDisplayService;
            _metodosApi         = metodosApi;

            IConfiguration configuration = new ConfigurationBuilder()
                                           .SetBasePath(Directory.GetCurrentDirectory())
                                           .AddJsonFile("appsettings.json")
                                           .Build();

            _serviceBusConfiguration = configuration.GetSection("serviceBus").Get <ServiceBusConfiguration>();

            _topicName        = topic;
            _subscriptionName = subscription;

            _cancelMessages = new CancellationTokenSource();
            ReceiveMessages(filterName, filter);
        }
示例#4
0
 public ReadStoreCatalog(IShowDisplayService showDisplayService, IMetodosApi metodosApi)
 {
     _showDisplayService = showDisplayService;
     _metodosApi         = metodosApi;
     CatalogVerify();
 }