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>();
        }
 public AddressResultInteractor(IAddressResultReadOnlyRepository repository, AddressResultDtoFactory factory)
 {
     this.repository = repository ?? throw new ArgumentNullException(nameof(repository));
     this.factory    = factory ?? throw new ArgumentNullException(nameof(factory));
 }