public MeteoService(IRepository<Location> locationRepository, IRepository<WeatherForecast> weatherForecastRepository) { _locationRepository = locationRepository; _weatherForecastRepository = weatherForecastRepository; _xmlService = new XmlService(); _webClientService = new WebClientService(); _openWeatherService = new OpenWeatherService(); _worldWeatherOnlineService = new WorldWeatherOnlineService(); }
public List<WeatherForecast> GetHistoricalWeatherList(string apiKey, List<string> cityNameList, string date, string endDate, IWebClientService webClientService, IXmlService xmlService, IOpenWeatherService openWeatherService) { List<WeatherForecast> weatherHistoricalForecast = new List<WeatherForecast>(); foreach (string cityName in cityNameList) { List<WeatherForecast> weatherHistoricalForecastByCity = GetHistoricalWeatherList(apiKey, cityName, date, endDate, webClientService, xmlService, openWeatherService); weatherHistoricalForecast.AddRange(weatherHistoricalForecastByCity); } return weatherHistoricalForecast; }
public void InitTest() { xmlServiceMock = new Mock<IXmlService>(); webClientServiceMock = new Mock<IWebClientService>(); openWeatherServiceMock = new Mock<IOpenWeatherService>(); xmlService = new XmlService(); webClientService = new WebClientService(); openWeatherService = new OpenWeatherService(); IDbContext dbContext = new MeteoContext(); IRepository<Location> locationRepository = new EfRepository<Location>(dbContext); IRepository<WeatherForecast> weatherForecastRepository = new EfRepository<WeatherForecast>(dbContext); meteoService = new MeteoService(locationRepository, weatherForecastRepository); }
public List<WeatherForecast> GetHistoricalWeatherList(string apiKey, string cityName, string date, string endDate, IWebClientService webClientService, IXmlService xmlService, IOpenWeatherService openWeatherService) { //string url = @"http://api.worldweatheronline.com/free/v2/past-weather.ashx?key={apiKey}&q={cityName}&format=xml&includeLocation=yes&date={date}&enddate={endDate}"; string url = ConfigurationManager.AppSettings["historicalWeatherUrl"]; url = url.Replace("{apiKey}", apiKey); url = url.Replace("{cityName}", cityName); url = url.Replace("{date}", date); url = url.Replace("{endDate}", endDate); LogHelper.WriteToLog("meteo.log", url); string weatherString = webClientService.Get(url); XDocument weatherDocument = xmlService.GetXmlDoc(weatherString); Location location = GetLocation(cityName); List<WeatherForecast> weatherHistoricalForecast = _worldWeatherOnlineService.GetWeatherHistoricalForecast(_worldWeatherOnlineService, xmlService, weatherDocument, location); return weatherHistoricalForecast; }
public SettingsPresenter(ISettingsView view) { this.view = view; try { xmlService = new XmlService(); webClientService = new WebClientService(); openWeatherService = new OpenWeatherService(); dbContext = new MeteoContext(); locationRepository = new EfRepository<Location>(dbContext); weatherForecastRepository = new EfRepository<WeatherForecast>(dbContext); meteoService = new MeteoService(locationRepository, weatherForecastRepository); } catch (Exception ex) { throw; } }
public MatchesController(IWebClientService webClient) { this.webClient = webClient; }
public FilmsController(IWebClientService clientService) { _clientService = clientService; }
/// <summary> /// Initialises a new instance of the RefController class. /// </summary> /// <param name="validationService"><c>ValidationService</c> instance.</param> /// <param name="webClientService"><c>WebClientService</c> instance.</param> public V3Controller(IValidationService validationService, IWebClientService webClientService) : base(validationService, webClientService) { }
public QuestionsController(IWebClientService webClient) { this.webClient = webClient; }
public UpdaterProvider(IApplicationExitProvider applicationExitProvider, IFileService fileService, IDirectoryService directoryService, IWebClientService webClientService, IPathService pathService, IAssemblyService assemblyService, IProcessStarterService processStarterService, IGuidGeneratorService guidGeneratorService, IIsCurrentVersionProvider isCurrentVersionProvider, IGlobalLogService globalLogService) { this._applicationExitProvider = applicationExitProvider; this._fileService = fileService; this._directoryService = directoryService; this._webClientService = webClientService; this._pathService = pathService; this._assemblyService = assemblyService; this._processStarterService = processStarterService; this._guidGeneratorService = guidGeneratorService; this._isCurrentVersionProvider = isCurrentVersionProvider; this._globalLogService = globalLogService; }
public GraphService(IWebClientService conection) : base(conection) { }
public MovieWebService(IWebClientService conection) { this.conection = conection; }
public SetupManager(IAssetBuilder assetBuilder, IWebClientService webClientService) { _assetBuilder = assetBuilder; _webClientService = webClientService; }
public PredictionsController(IWebClientService webClient) { this.webClient = webClient; }
public MissioContext(DbContextOptions <MissioContext> options, IPasswordHasher <User> passwordService, IWebClientService webClientService) : base(options) { _webClientService = webClientService; _passwordService = passwordService; }
public DispenserPresenter(IDispenserView dispenserView, CoinStoragePresenter coinStoragePresenter, IWebClientService coinService, IWebClientService drinkService) { _dispenserView = dispenserView; _coinService = coinService; _drinkService = drinkService; //_coinStorageView = coinStorageView; _coinStoragePresenter = coinStoragePresenter; _coinsInserted = new List <CoinStore>(); FillDispenser(); //subscriptions EventAggregator.Instance.Subscribe <ApplicationMessageGeneric <CoinStore> >(OnCoinSelected); EventAggregator.Instance.Subscribe <ApplicationMessageGeneric <Drink> >(OnDrinkSelected); dispenserView.Cancel += OnCancel; dispenserView.Order += OnOrdering; }
public TestsController(IWebClientService webClient) { this.webClient = webClient; }
public MatchesController(IWebClientService webClientService) { _webClientService = webClientService; }
public void InitTest() { webClientService = new WebClientService(); }
public RetryWebClientServiceDecorator(IWebClientService webClientServiceImplementation) { this._webClientServiceImplementation = webClientServiceImplementation; }
public FoursquareAdapter(ILogger logger, IWebClientService webClient, IKmlCalculator kmlCalculator) { _logger = logger; _webClient = webClient; _kmlCalculator = kmlCalculator; }
/// <summary> /// Construtor do serviço de Juros. /// </summary> /// <param name="loggingService">Instância do Serviço de Logging.</param> /// <param name="config">Instance of IConfiuration que armazena a configuração do appsettings.json</param> /// <param name="webClientService">Cliente Web para realização de requisições HTTP.</param> public JurosService(ILoggingService <JurosService> loggingService, IConfiguration config, IWebClientService webClientService) { _loggingService = loggingService; _config = config; _webClientService = webClientService; }
public LoginsController(IWebClientService webClient) { this.webClient = webClient; }
public VeraService(IWebClientService webClientService, IVeraControllerService veraControllerService) { _webClientService = webClientService; _veraControllerService = veraControllerService; SetUp(); }
public FileDownloader(IWebClientService webClient) { _webClient = webClient; }
public PlanetsController(IWebClientService clientService) { _clientService = clientService; }
public BoxersController(IWebClientService webClient) { this.webClient = webClient; }
public BaseDuplexService(IWebClientService web) { mWebClientService = web; mWebClientService.SetHanleCallback(SendMessage); }
public HomeController(IWebClientService webClient) { this.webClient = webClient; }
public NewsfeedItemCoreViewModel(IWebClientService cookieWebClientService, INotificationService notificationService) { _cookieWebClientService = cookieWebClientService; _notificationService = notificationService; }
/// <summary> /// initialize /// </summary> public FeedService(IWebClientService webClientService) { _webClientService = webClientService; }
/// <summary> /// コンストラクタ /// </summary> /// <param name="youtubeService">YouTubeサービス</param> /// <param name="webClientService">Webクライエントサービス</param> public AddOrClonePlaylistItemsDialogViewModel(IYouTubeService youtubeService, IWebClientService webClientService) { m_YouTubeService = youtubeService; m_WebClientService = webClientService; SearchWord = new ReactivePropertySlim <string>().AddTo(m_Disposables); SearchResultList = new ReactiveCollection <ChannelViewModel>().AddTo(m_Disposables); TargetPlaylistList = new ReactiveCollection <PlaylistViewModel>().AddTo(m_Disposables); TargetVideoList = new ReactiveCollection <VideoViewModel>().AddTo(m_Disposables); SearchResultList = new ReactiveCollection <ChannelViewModel>().AddTo(m_Disposables); SelectedItem = new ReactivePropertySlim <ChannelViewModel>().AddTo(m_Disposables); ActiveTab = new ReactivePropertySlim <ItemType>().AddTo(m_Disposables); // 選択アイテム・タブが変更されたらプレイリスト・動画一覧を更新 SelectedItem.Subscribe(_ => UpdateActiveTab()); ActiveTab.Subscribe(_ => UpdateActiveTab()); }
public AccountController(IWebClientService webClientService) { _webClientService = webClientService; }
public List<WeatherForecast> GetWeatherList(List<string> cityList, int forecastDaysCount, IWebClientService webClientService, IXmlService xmlService, IOpenWeatherService openWeatherService) { List<WeatherForecast> weatherForecasts = new List<WeatherForecast>(); List<Location> currentLocations = GetLocations(); foreach (string city in cityList) { WeatherForecast weatherForecast = GetWeather(city, forecastDaysCount, webClientService, xmlService, openWeatherService, currentLocations); weatherForecasts.Add(weatherForecast); } return weatherForecasts; }
public DotnetCrawlerPageLinkReader(IWebClientService webClientService) { _webClientService = webClientService; }
/// <summary> /// Initialises a new instance of the BaseApiController class. /// </summary> /// <param name="validationService"><c>ValidationService</c> instance.</param> /// <param name="webClientService"><c>WebClientService</c> instance.</param> protected BaseApiController(IValidationService validationService, IWebClientService webClientService) { this.ValidationService = validationService; this.WebClientService = webClientService; }
private static UsersController MakeUsersController(MissioContext missioContext = null, IWebClientService webClientService = null) { if (missioContext == null) { missioContext = Utils.MakeMissioContext(); } if (webClientService == null) { webClientService = Substitute.For <IWebClientService>(); } var passwordService = new MockPasswordService(); var userService = new UsersService(missioContext, passwordService, webClientService); return(new UsersController(userService)); }
public WeatherForecast GetWeather(string city, int forecastDaysCount, IWebClientService webClientService, IXmlService xmlService, IOpenWeatherService openWeatherService, List<Location> currentLocations) { string url = "http://api.openweathermap.org/data/2.5/forecast/daily?q=city&mode=xml&units=metric&cnt=forecastDaysCount"; url = url.Replace("city", city); url = url.Replace("forecastDaysCount", forecastDaysCount.ToString()); string weatherString = webClientService.Get(url); XDocument weatherDocument = xmlService.GetXmlDoc(weatherString); WeatherForecast weatherForecast = openWeatherService.GetWeatherForecast(openWeatherService, xmlService, weatherDocument, currentLocations, forecastDaysCount); return weatherForecast; }
public DotnetCrawlerDownloader(IWebClientService webClientService) { _webClientService = webClientService; }
public UsersController(IWebClientService webClientService) { _webClientService = webClientService; }