public CurrenciesDownloader()
 {
     this._client = WebFactoring.CreateWebClient();
     this._client.Headers.Add(HttpRequestHeader.UserAgent, "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.86 Safari/537.36 OPR/60.0.3255.27");
     this._cultureInfo = CultureInfo.GetCultureInfo("ru-Ru");
     if (this._innerCurrencies.Count != ECurrencyEnumHelper.ActualCount - 1)
     {
         throw new ArgumentException(string.Format("Есть информация по {0} из {1} курсов", (object)this._innerCurrencies.Count, (object)(ECurrencyEnumHelper.ActualCount - 1)));
     }
 }
Beispiel #2
0
 public NewVersionUpdater()
 {
     this.NewVersion   = this.CurrentVersion = Assembly.GetExecutingAssembly().GetName().Version;
     this._projectName = ClientConfig.ProjectName;
     this._wbClient    = WebFactoring.CreateWebClient();
 }