Пример #1
0
        private static T smethod_15 <T>(Type type_1) where T : Attribute
        {
            T    local;
            Type type = smethod_12(type_1);

            if (type != null)
            {
                local = Class194.smethod_30 <T>(type, true);
                if (local != null)
                {
                    return(local);
                }
            }
            local = Class194.smethod_30 <T>(type_1, true);
            if (local != null)
            {
                return(local);
            }
            foreach (Type type2 in type_1.GetInterfaces())
            {
                local = Class194.smethod_30 <T>(type2, true);
                if (local != null)
                {
                    return(local);
                }
            }
            return(default(T));
        }
Пример #2
0
        public static T smethod_17 <T>(object object_0) where T : Attribute
        {
            Type type = object_0 as Type;

            if (type != null)
            {
                return(smethod_15 <T>(type));
            }
            MemberInfo info = object_0 as MemberInfo;

            if (info != null)
            {
                return(smethod_16 <T>(info));
            }
            return(Class194.smethod_30 <T>(object_0, true));
        }
Пример #3
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));
        }