コード例 #1
0
        protected static PropertyInfo PropertyInfoByName(PropertyLookupCache propertyLookupCache, string propertyName)
        {
            if (propertyLookupCache.PropertyInfoForPropertyName.ContainsKey(propertyName))
            {
                return(propertyLookupCache.PropertyInfoForPropertyName[propertyName]);
            }

            return(null);
        }
コード例 #2
0
        public PropertyLookupCache ForType(Type type)
        {
            if (LookupCacheByType == null)
            {
                LookupCacheByType = new Dictionary<Type, PropertyLookupCache>();
            }

            if (!LookupCacheByType.ContainsKey(type))
            {
                LookupCacheByType[type] = new PropertyLookupCache(type);
            }

            return LookupCacheByType[type];
        }
コード例 #3
0
        protected static PropertyInfo PropertyInfoByName(PropertyLookupCache propertyLookupCache, string propertyName)
        {
            if (propertyLookupCache.PropertyInfoForPropertyName.ContainsKey(propertyName))
            {
                return propertyLookupCache.PropertyInfoForPropertyName[propertyName];
            }

            return null;
        }