Ejemplo n.º 1
0
        public static DataMemberAttribute smethod_6(MemberInfo memberInfo_0)
        {
            if (memberInfo_0.smethod_1() == MemberTypes.Field)
            {
                return(Class140 <DataMemberAttribute> .smethod_0(memberInfo_0));
            }
            PropertyInfo        info      = (PropertyInfo)memberInfo_0;
            DataMemberAttribute attribute = Class140 <DataMemberAttribute> .smethod_0(info);

            if ((attribute == null) && info.smethod_0())
            {
                for (Type type = info.DeclaringType; attribute == null; type = type.smethod_6())
                {
                    if (type == null)
                    {
                        return(attribute);
                    }
                    PropertyInfo info2 = (PropertyInfo)Class194.smethod_34(type, info);
                    if ((info2 != null) && info2.smethod_0())
                    {
                        attribute = Class140 <DataMemberAttribute> .smethod_0(info2);
                    }
                }
            }
            return(attribute);
        }
Ejemplo n.º 2
0
        private static T smethod_16 <T>(MemberInfo memberInfo_0) where T : Attribute
        {
            T    local;
            Type type = smethod_12(memberInfo_0.DeclaringType);

            if (type != null)
            {
                MemberInfo info = Class194.smethod_34(type, memberInfo_0);
                if (info != null)
                {
                    local = Class194.smethod_30 <T>(info, true);
                    if (local != null)
                    {
                        return(local);
                    }
                }
            }
            local = Class194.smethod_30 <T>(memberInfo_0, true);
            if (local != null)
            {
                return(local);
            }
            if (memberInfo_0.DeclaringType != null)
            {
                foreach (Type type2 in memberInfo_0.DeclaringType.GetInterfaces())
                {
                    MemberInfo info2 = Class194.smethod_34(type2, memberInfo_0);
                    if (info2 != null)
                    {
                        local = Class194.smethod_30 <T>(info2, true);
                        if (local != null)
                        {
                            return(local);
                        }
                    }
                }
            }
            return(default(T));
        }