Exemplo n.º 1
0
 public IDictionary <string, string> GetAllParameters()
 {
     return(_cacheConfiguration.GetAllParameters());
 }
Exemplo n.º 2
0
        private static object CreateCacheProviderFromConfig(Type entityType, string dataStoreSetId, IHorizontalCacheConfiguration hconfig, object dao, IEnumerable <PropertyInfo> cachedProperties)
        {
            var cacheProviderType = GetProviderType(hconfig);

            if (cacheProviderType == null)
            {
                return(null);
            }

            var dataSourceEnumerator = typeof(IDataSourceEnumerator <>).MakeGenericType(entityType);

            if (!dataSourceEnumerator.IsAssignableFrom(dao.GetType()))
            {
                return(null);
            }

            var persistentCacheProviderType = cacheProviderType.MakeGenericType(entityType);

            return(Activator.CreateInstance(persistentCacheProviderType, dataStoreSetId, hconfig.GetAllParameters(), dao, cachedProperties));
        }