public void ClearCash() { WeatherInfoCash.Clear(); lock (_providerInfoCashLockObject) { _providerInfoCash = null; } }
public IDataProviderInfo[] GetWeatherDataProviders() { lock (_providerInfoCashLockObject) { if (_providerInfoCash == null || _providerInfoCash.TimeStamp.AddSeconds(_secondsInCash) <= TimeProvider.Current.UtcNow) { _providerInfoCash = GetWeatherProvider(); } return _providerInfoCash.InfoListValue; } }
public IDataProviderInfo[] GetWeatherDataProviders() { lock (_providerInfoCashLockObject) { if (_providerInfoCash == null || _providerInfoCash.TimeStamp.AddSeconds(_secondsInCash) <= TimeProvider.Current.UtcNow) { _providerInfoCash = GetWeatherProvider(); } return(_providerInfoCash.InfoListValue); } }