private void ReplaceCache(object state)
        {
            try
            {
                _clearCacheAttempts++;

                //don't replace any cached values unless all cached values can be replaced
                //  if a file is locked, the exception will reschedule replacing the cache
                var serviceProvider   = _innerRepository.GetServiceProvider();
                var circleOfTrusts    = _innerRepository.GetCircleOfTrusts();
                var identityProviders = _innerRepository.GetIdentityProviders();

                _serviceProvider   = serviceProvider;
                _cirlcesOfTrust    = circleOfTrusts;
                _identityProviders = identityProviders;

                _clearCacheAttempts = 0;
            }
            catch (Exception ex)
            {
                if (_clearCacheAttempts > 0 && _clearCacheAttempts % 100 == 0)
                {
                    ex.Data["homeFolder"] = _homeFolder;
                    LoggerFactory.GetLogger <ServiceProviderUtility>().Error(ex, "Unable to load configuration");
                }
                ClearCache(null, null);
            }
        }
예제 #2
0
        private void ReplaceCache(object state)
        {
            try
            {
                _clearCacheAttempts++;

                //don't replace any cached values unless all cached values can be replaced
                //  if a file is locked, the exception will reschedule replacing the cache
                var serviceProvider = _innerRepository.GetServiceProvider();
                var circleOfTrusts = _innerRepository.GetCircleOfTrusts();
                var identityProviders = _innerRepository.GetIdentityProviders();

                _serviceProvider = serviceProvider;
                _cirlcesOfTrust = circleOfTrusts;
                _identityProviders = identityProviders;

                _clearCacheAttempts = 0;
            }
            catch (Exception ex)
            {
                if (_clearCacheAttempts > 0 && _clearCacheAttempts % 100 == 0)
                {
                    ex.Data["homeFolder"] = _homeFolder;
                    LoggerFactory.GetLogger<ServiceProviderUtility>().Error(ex, "Unable to load configuration");
                }
                ClearCache(null, null);
            }
        }
예제 #3
0
 public ISamlServiceProvider GetServiceProvider()
 {
     return _serviceProvider ?? (_serviceProvider = _innerRepository.GetServiceProvider());
 }
 public ISamlServiceProvider GetServiceProvider()
 {
     return(_serviceProvider ?? (_serviceProvider = _innerRepository.GetServiceProvider()));
 }