コード例 #1
0
ファイル: Class139.cs プロジェクト: wangzhaoming/HearthBuddy
        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
ファイル: Class139.cs プロジェクト: wangzhaoming/HearthBuddy
        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
ファイル: Class139.cs プロジェクト: wangzhaoming/HearthBuddy
        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));
        }