GetBasePropertyDefinition() статический приватный Метод

static private GetBasePropertyDefinition ( PropertyInfo property ) : PropertyInfo
property System.Reflection.PropertyInfo
Результат System.Reflection.PropertyInfo
Пример #1
0
        private static ICustomAttributeProvider GetBase(ICustomAttributeProvider obj)
        {
            if (obj == null)
            {
                return(null);
            }
            if (obj is Type)
            {
                return(((Type)obj).BaseType);
            }
            MethodInfo methodInfo = null;

            if (obj is MonoProperty)
            {
                return(MonoCustomAttrs.GetBasePropertyDefinition((MonoProperty)obj));
            }
            if (obj is MonoMethod)
            {
                methodInfo = (MethodInfo)obj;
            }
            if (methodInfo == null || !methodInfo.IsVirtual)
            {
                return(null);
            }
            MethodInfo baseDefinition = methodInfo.GetBaseDefinition();

            if (baseDefinition == methodInfo)
            {
                return(null);
            }
            return(baseDefinition);
        }