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();
        }
Ejemplo n.º 2
0
 public MainViewModel(IWeatherForecastService dataService)
 {
     WeatherForecastService = dataService;
     if (NetworkInterface.GetIsNetworkAvailable())
     {
         LoadDataFromNetwork();
         InitializeCommands();
     }
     else
     {
         ShowNoNetworkAvailableMessage();
     }
 }
Ejemplo n.º 3
0
 public WeatherForecastController(IWeatherForecastService weatherForecastService, ILogger <WeatherForecastController> logger)
 {
     _weatherForecastService = weatherForecastService;
     _logger = logger;
 }
Ejemplo n.º 4
0
 public WeatherForecastController(IWeatherForecastService dataService)
 => this.DataService = dataService;
Ejemplo n.º 5
0
 public WeatherService()
 {
     this.service = WeatherForecastServiceClient.Default;
 }
Ejemplo n.º 6
0
 public WeatherForecastController(ILogger <WeatherForecastController> logger,
                                  IWeatherForecastService service)
 {
     _logger       = logger;
     this._service = service;
 }
Ejemplo n.º 7
0
 public ForecastFunction(ILogger <ForecastFunction> logger, IWeatherForecastService weatherForecast)
 {
     _logger          = logger;
     _weatherForecast = weatherForecast;
 }
 public WeatherFacade()
 {
     _geolocationService = new GeolocationService();
     _weatherForecastService = new WeatherForecastService();
     _temperatureUnitConverter = new TemperatureUnitConverter();
 }
Ejemplo n.º 9
0
 public WeatherForecastController(IWeatherForecastService weatherForecastService) => _weatherForecastService = weatherForecastService;
Ejemplo n.º 10
0
 public FetchDataViewModel(IWeatherForecastService service)
 => _service = service;
Ejemplo n.º 11
0
 public ForecastByPositionCommand(IWeatherForecastService weatherForecastService) : base(weatherForecastService)
 {
 }
Ejemplo n.º 12
0
 public CityController(ICityService cityService, ICountryService ctService, IWeatherForecastService wService)
 {
     this.CityService    = cityService;
     this.CountryService = ctService;
     this.WeatherService = wService;
 }
Ejemplo n.º 13
0
 public WeatherForecastController(ILogger <WeatherForecastController> logger, IWeatherForecastService weatherForecast)
 {
     this.logger          = logger;
     this.weatherForecast = weatherForecast;
 }
Ejemplo n.º 14
0
 public WeatherForecastController(IMessageService messageService, IWeatherForecastService weatherForecastService)
 {
     this._messageService         = messageService;
     this._weatherForecastService = weatherForecastService;
 }
Ejemplo n.º 15
0
 public void Subscribe(IWeatherForecastService weatherForecastService)
 {
     weatherForecastService.OnWeatherTransactionProcessed += WriteAuditLog;
 }
Ejemplo n.º 16
0
 /// <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;
 }
Ejemplo n.º 18
0
 public WeatherForecastController(IWeatherForecastService weatherForecastService, IAuditService auditService)
 {
     this._weatherForecastService = weatherForecastService;
     this._auditService           = auditService;
     this._auditService.Subscribe(this._weatherForecastService);
 }
Ejemplo n.º 19
0
 public WeatherForecastController(ILogger <WeatherForecastController> logger, IWeatherForecastService weatherForecastService)
 {
     _logger = logger;
     _weatherForecastService = weatherForecastService;
 }
Ejemplo n.º 20
0
        public WeatherViewModel(string backendUrl)
        {
            var client = new WeatherClient(GrpcChannel.ForAddress(backendUrl));

            weatherService = new GrpcWeatherForecastService(client);
        }
Ejemplo n.º 21
0
 public WeatherForecastController(IWeatherForecastService weatherForecastService, ILogger <WeatherForecastController> logger)
 {
     _weatherForecastService = weatherForecastService ?? throw new ArgumentNullException(nameof(IWeatherForecastService));
     _logger = logger;
 }
Ejemplo n.º 22
0
 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);
 }
Ejemplo n.º 25
0
 public WeatherController(IWeatherForecastService weatherForecastService)
 {
     _weatherForecastService = weatherForecastService;
 }
Ejemplo n.º 26
0
 public WeatherForecastController(IWeatherForecastService service)
 {
     _service = service;
 }
Ejemplo n.º 27
0
 public WeatherForecastController(ILogger <WeatherForecastController> logger, IWeatherForecastService forecastService)
 {
     _forecastService = forecastService;
     _logger          = logger;
 }
Ejemplo n.º 28
0
 public void The_weather_forecast()
 {
     _weather = new WeatherForecastService();
 }