Bitcoin_QR_Popup.Form1.check_currency_list_for_refresh C# (CSharp) Метод

check_currency_list_for_refresh() приватный Метод

private check_currency_list_for_refresh ( string currency_list ) : bool
currency_list string
Результат bool
        private bool check_currency_list_for_refresh(string[] currency_list)
        {
            int refetch_interval_minutes = 60;
            bool need_to_fetch = false;
            foreach (string code in currency_list)
            {
                if (!(exchange_rates.Keys.Contains(code)))
                {
                    exchange_rates[code] = new exchange_rate();
                    need_to_fetch = true;
                }
                else if (exchange_rates[code].time_fetched.AddMinutes(refetch_interval_minutes) < DateTime.Now)
                {
                    need_to_fetch = true;
                }
            }
            return need_to_fetch;
        }