Ejemplo n.º 1
0
 private bool Subscribe()
 {
     _messageBusClient.Subscribe <DepartureCitiesResponse>(ReceiveDepartureCitiesResponse);
     _messageBusClient.Subscribe <CountriesResponse>(ReceiveCountriesResponse);
     _messageBusClient.Subscribe <CitiesResponse>(ReceiveCitiesResponse);
     _messageBusClient.Subscribe <HotelsResponse>(ReceiveHotelsResponse);
     _messageBusClient.Subscribe <HotelResponse>(ReceiveHotelResponse);
     return(true);
 }
Ejemplo n.º 2
0
        public async Task StartAsync(CancellationToken cancellationToken)
        {
            //инициализируем данные по конкретному провайдеру
            await _tourRepository.InitializeDataContext();

            await _dictionariesRepository.InitializeDataContext();

            //подписываемся на получение запроса на поиск через шину
            _messageBusClient.Subscribe <ToursRequest>(async request => await ReceiveRequest(request));
            _messageBusClient.Subscribe <CitiesRequest>(async request => await ReceiveCitiesRequest(request));
            _messageBusClient.Subscribe <CountriesRequest>(async request => await ReceiveCountriesRequest(request));
            _messageBusClient.Subscribe <DepartureCitiesRequest>(async request => await ReceiveDepartureCitiesRequest(request));
            _messageBusClient.Subscribe <HotelRequest>(async request => await ReceiveHotelRequest(request));
            _messageBusClient.Subscribe <HotelsRequest>(async request => await ReceiveHotelsRequest(request));
        }
Ejemplo n.º 3
0
 private bool Subscribe()
 {
     _messageBusClient.Subscribe <ToursResponse>(ReceiveResponse);
     return(true);
 }