コード例 #1
0
        public ICachingProviderConfiguration GetCachingProvider(string providerName = null)
        {
            if (!HasCachingProviders)
            {
                return(null);
            }

            // caching providers
            //  2nd check to see if this particular repository has a provider declared
            //      if so, find it and use it with this strategy
            //      if not, check for a default declaration to use

            if (String.IsNullOrEmpty(providerName))
            {
                providerName = DefaultCachingProvider;
            }

            return(String.IsNullOrEmpty(providerName) ? null : CachingProviders.FirstOrDefault(s => s.Name == providerName));
        }
コード例 #2
0
 public void AddCachingProvider(ICachingProviderConfiguration cachingProviderConfiguration)
 {
     CachingProviders.Add(cachingProviderConfiguration);
 }