public PlaneBackgroundService(
            ILogger <PlaneBackgroundService> logger,
            IConfiguration configuration,
            IHostEnvironment hostEnvironment)
        {
            _logger = logger;

            var name           = HostServiceNameSelector.AssignName("Plane", hostEnvironment.EnvironmentName, configuration.GetValue <string>("name"));
            var updatePlaneUrl = configuration.GetValue <string>("UpdatePlaneUrl");
            var addPlaneUrl    = configuration.GetValue <string>("AddPlaneUrl");
            var deletePlaneUrl = configuration.GetValue <string>("DeletePlaneUrl");
            var getAirportUrl  = configuration.GetValue <string>("GetAirportUrl");
            var getAirportsUrl = configuration.GetValue <string>("GetAirportsUrl");

            _planeLifetimeManager = new PlaneLifetimeManager(name, updatePlaneUrl, addPlaneUrl,
                                                             getAirportUrl, getAirportsUrl, deletePlaneUrl);

            _logger.LogInformation("Created PlaneBackgroundService for: " + name);
        }
        public AirportBackgroundService(
            ILogger <AirportBackgroundService> logger,
            IConfiguration configuration,
            IHostEnvironment hostEnvironment)
        {
            _logger = logger;

            var name = HostServiceNameSelector.AssignName("Airport",
                                                          hostEnvironment.EnvironmentName, configuration.GetValue <string>("name"));
            var color            = configuration.GetValue <string>("color");
            var latitude         = configuration.GetValue <string>("latitude");
            var longitude        = configuration.GetValue <string>("longitude");
            var updateAirportUrl = configuration.GetValue <string>("UpdateAirportUrl");
            var addAirportUrl    = configuration.GetValue <string>("AddAirportUrl");
            var deleteAirportUrl = configuration.GetValue <string>("DeleteAirportUrl");

            _airportLifetimeManager = new AirportLifetimeManager(
                name, color, latitude, longitude,
                updateAirportUrl, addAirportUrl, deleteAirportUrl);

            _logger.LogInformation("Created AirportBackgroundService for: " + name);
        }