Пример #1
0
        protected ICacheConfigurationProperty For <TProp>(Expression <Func <T, TProp> > expression)
        {
            var prop = CacheConfigurationProperty <TProp> .Create(expression);

            prop.SetOrder(_configurations.Count + 1);
            _configurations.Add(prop);
            return(prop);
        }
Пример #2
0
        protected void ExtractAllProperties()
        {
            var properties = typeof(T).GetProperties(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic);

            foreach (var propertyInfo in properties)
            {
                if (!propertyInfo.CanRead || !propertyInfo.CanWrite)
                {
                    continue;
                }

                var property = new CacheConfigurationProperty(propertyInfo);
                property.SetOrder(_configurations.Count + 1);
                _configurations.Add(property);
            }
        }