public OpenStreetMapApi(string baseUrl, RabbitMQConfiguration rabbitMQConfiguration)
        {
            this.baseUrl = baseUrl ?? throw new ArgumentNullException(nameof(baseUrl));
            client       = new HttpClient();
            client.DefaultRequestHeaders.Add("User-Agent", "Services demo");

            rabbitMQInteractor      = new RabbitMQInteractor(rabbitMQConfiguration);
            addressResultDtoFactory = new AddressResultDtoFactory();
        }
예제 #2
0
        public ConsumerServices(IServiceCollection services, RabbitMQConfiguration rabbitMQConfiguration)
        {
            serviceProvider = services.BuildServiceProvider();
            serviceScope    = serviceProvider.CreateScope();

            this.rabbitMQConfiguration = rabbitMQConfiguration;

            updateAddressResultInteractor = serviceProvider.GetService <UpdateAddressResultInteractor>();
            rabbitMQInteractor            = serviceProvider.GetService <RabbitMQInteractor>();
            addressResultDtoFactory       = serviceProvider.GetService <AddressResultDtoFactory>();
        }