public MainViewModel(IDataAccess dataAccess) { Title = "Code Challenge Weather App"; MapViewModel = new MapViewModel(59.326142, 17.9875455, 8.0); Locations = dataAccess.Locations; SearchService = new SearchService(dataAccess.Locations); _weatherForecastService = new WeatherForecastService(); }
public MainViewModel(IWeatherForecastService dataService) { WeatherForecastService = dataService; if (NetworkInterface.GetIsNetworkAvailable()) { LoadDataFromNetwork(); InitializeCommands(); } else { ShowNoNetworkAvailableMessage(); } }
public WeatherForecastController(IWeatherForecastService weatherForecastService, ILogger <WeatherForecastController> logger) { _weatherForecastService = weatherForecastService; _logger = logger; }
public WeatherForecastController(IWeatherForecastService dataService) => this.DataService = dataService;
public WeatherService() { this.service = WeatherForecastServiceClient.Default; }
public WeatherForecastController(ILogger <WeatherForecastController> logger, IWeatherForecastService service) { _logger = logger; this._service = service; }
public ForecastFunction(ILogger <ForecastFunction> logger, IWeatherForecastService weatherForecast) { _logger = logger; _weatherForecast = weatherForecast; }
public WeatherFacade() { _geolocationService = new GeolocationService(); _weatherForecastService = new WeatherForecastService(); _temperatureUnitConverter = new TemperatureUnitConverter(); }
public WeatherForecastController(IWeatherForecastService weatherForecastService) => _weatherForecastService = weatherForecastService;
public FetchDataViewModel(IWeatherForecastService service) => _service = service;
public ForecastByPositionCommand(IWeatherForecastService weatherForecastService) : base(weatherForecastService) { }
public CityController(ICityService cityService, ICountryService ctService, IWeatherForecastService wService) { this.CityService = cityService; this.CountryService = ctService; this.WeatherService = wService; }
public WeatherForecastController(ILogger <WeatherForecastController> logger, IWeatherForecastService weatherForecast) { this.logger = logger; this.weatherForecast = weatherForecast; }
public WeatherForecastController(IMessageService messageService, IWeatherForecastService weatherForecastService) { this._messageService = messageService; this._weatherForecastService = weatherForecastService; }
public void Subscribe(IWeatherForecastService weatherForecastService) { weatherForecastService.OnWeatherTransactionProcessed += WriteAuditLog; }
/// <summary> /// Initializes a new instance of the <see cref="WeatherForecastController"/> class. /// </summary> /// <param name="weatherForecastService">Instance of <see cref="IWeatherForecastService"/>.</param> /// <param name="logger">Logger.</param> public WeatherForecastController(IWeatherForecastService weatherForecastService, ILogger <WeatherForecastController> logger) { this.weatherForecastService = weatherForecastService ?? throw new ArgumentNullException(nameof(weatherForecastService)); this.logger = logger ?? throw new ArgumentNullException(nameof(logger)); }
public WeatherController(IConfiguration configuration, IWeatherForecastService weatherService) { _configuration = configuration; _weatherService = weatherService; }
public WeatherForecastController(IWeatherForecastService weatherForecastService, IAuditService auditService) { this._weatherForecastService = weatherForecastService; this._auditService = auditService; this._auditService.Subscribe(this._weatherForecastService); }
public WeatherForecastController(ILogger <WeatherForecastController> logger, IWeatherForecastService weatherForecastService) { _logger = logger; _weatherForecastService = weatherForecastService; }
public WeatherViewModel(string backendUrl) { var client = new WeatherClient(GrpcChannel.ForAddress(backendUrl)); weatherService = new GrpcWeatherForecastService(client); }
public WeatherForecastController(IWeatherForecastService weatherForecastService, ILogger <WeatherForecastController> logger) { _weatherForecastService = weatherForecastService ?? throw new ArgumentNullException(nameof(IWeatherForecastService)); _logger = logger; }
public WeatherForecastController(IWeatherForecastService forecast) => _forecast = forecast;
public ForecastsController(IWeatherForecastService weatherForecastService) { this.weatherForecastService = weatherForecastService; }
public void Setup() { _mockService = Substitute.For <IWeatherForecastService>(); _mockLogger = Substitute.For <ILogger <ForecastController> >(); _controller = new ForecastController(_mockLogger, _mockService); }
public WeatherController(IWeatherForecastService weatherForecastService) { _weatherForecastService = weatherForecastService; }
public WeatherForecastController(IWeatherForecastService service) { _service = service; }
public WeatherForecastController(ILogger <WeatherForecastController> logger, IWeatherForecastService forecastService) { _forecastService = forecastService; _logger = logger; }
public void The_weather_forecast() { _weather = new WeatherForecastService(); }