Ejemplo n.º 1
0
 public void ClearCash()
 {
     WeatherInfoCash.Clear();
     lock (_providerInfoCashLockObject)
     {
         _providerInfoCash = null;
     }
 }
 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;
     }
 }
Ejemplo n.º 4
0
 public IDataProviderInfo[] GetWeatherDataProviders()
 {
     lock (_providerInfoCashLockObject)
     {
         if (_providerInfoCash == null ||
             _providerInfoCash.TimeStamp.AddSeconds(_secondsInCash) <= TimeProvider.Current.UtcNow)
         {
             _providerInfoCash = GetWeatherProvider();
         }
         return(_providerInfoCash.InfoListValue);
     }
 }