FindProperty() public method

Find a Method using the methodKey provided. Look in the methodMap for an entry. If found, it'll either be a CACHE_MISS, in which case we simply give up, or it'll be a Method, in which case, we return it. If nothing is found, then we must actually go and introspect the method from the MethodMap.
public FindProperty ( String name ) : PropertyInfo
name String
return System.Reflection.PropertyInfo
示例#1
0
        public System.Reflection.PropertyInfo FindProperty(string name)
        {
            var propertyInfo = _classMap.FindProperty(name);

            if (propertyInfo == null)
            {
                return(new DynamicPropertyInfo(_type, name));
            }
            else
            {
                return(propertyInfo);
            }
        }
示例#2
0
        public virtual PropertyEntry GetProperty(Type c, string name)
        {
            if (c == null)
            {
                throw new System.ArgumentException("class object is null!");
            }


            IIntrospectorCache ic = IntrospectorCache;

            ClassMap classMap = ic.Get(c);

            if (classMap == null)
            {
                classMap = ic.Put(c);
            }

            return(classMap.FindProperty(name));
        }
示例#3
0
        public virtual PropertyInfo GetProperty(Type c, string name)
        {
            if (c == null)
            {
                throw new System.Exception("Introspector.getMethod(): Class method key was null: " + name);
            }
            ClassMap classMap = null;

            lock (this.classMethodMaps)
            {
                classMap = (ClassMap)this.classMethodMaps[c];
                if (classMap == null)
                {
                    if (this.cachedClassNames.Contains(c.FullName))
                    {
                        this.ClearCache();
                    }
                    classMap = this.CreateClassMap(c);
                }
            }
            return(classMap.FindProperty(name));
        }