Exemplo n.º 1
0
 public AirportsApplicationService(IApplicationModuleSettings applicationModuleSettings,
                                   IFlurlClientFactory flurlClientFactory,
                                   IIndex <DistanceUnit, IMetersConverterApplicationService> converterServices)
 {
     this.airportDetailsApiUrl = (applicationModuleSettings ?? throw new ArgumentNullException(nameof(applicationModuleSettings)))
                                 .AirportDetailsApiUrl ?? throw new ArgumentException($"{nameof(applicationModuleSettings.AirportDetailsApiUrl)} is required");
     this.flurlClient       = (flurlClientFactory ?? throw new ArgumentNullException(nameof(flurlClient))).Get(this.airportDetailsApiUrl);
     this.converterServices = converterServices;
 }
 public ApplicationModule(IApplicationModuleSettings settings)
 {
     this.settings = settings ?? throw new ArgumentNullException(nameof(settings));
 }