Beispiel #1
0
        public static DataMemberAttribute LogoutClass(MemberInfo i)
        {
            //Discarded unreachable code: IL_0002
            //IL_0003: Incompatible stack heights: 0 vs 1
            if (i.DefineReader() == MemberTypes.Field)
            {
                return(GDBD.Items.WriterTestItem <DataMemberAttribute> .CompareClient(i));
            }
            PropertyInfo        propertyInfo        = (PropertyInfo)i;
            DataMemberAttribute dataMemberAttribute = GDBD.Items.WriterTestItem <DataMemberAttribute> .CompareClient(propertyInfo);

            if (dataMemberAttribute == null && propertyInfo.DefineIssuer())
            {
                Type type = propertyInfo.DeclaringType;
                while (dataMemberAttribute == null && type != null)
                {
                    PropertyInfo propertyInfo2 = (PropertyInfo)ResolverErrorFilter.PrepareReader(type, propertyInfo);
                    if (propertyInfo2 != null && propertyInfo2.DefineIssuer())
                    {
                        dataMemberAttribute = GDBD.Items.WriterTestItem <DataMemberAttribute> .CompareClient(propertyInfo2);
                    }
                    type = type.WriteReader();
                }
            }
            return(dataMemberAttribute);
        }
Beispiel #2
0
        private static T PrepareClass <[_0008._0012(0)] T>(MemberInfo item) where T : Attribute
        {
            //Discarded unreachable code: IL_0002
            //IL_0003: Incompatible stack heights: 0 vs 1
            Type type = ForgotClass(item.DeclaringType);
            T    val;

            if (type != null)
            {
                MemberInfo memberInfo = ResolverErrorFilter.PrepareReader(type, item);
                if (memberInfo != null)
                {
                    val = ResolverErrorFilter.PopReader <T>(memberInfo, iscounter: true);
                    if (val != null)
                    {
                        return(val);
                    }
                }
            }
            val = ResolverErrorFilter.PopReader <T>(item, iscounter: true);
            if (val != null)
            {
                return(val);
            }
            if (item.DeclaringType != null)
            {
                Type[] interfaces = item.DeclaringType.GetInterfaces();
                for (int i = 0; i < interfaces.Length; i++)
                {
                    MemberInfo memberInfo2 = ResolverErrorFilter.PrepareReader(interfaces[i], item);
                    if (memberInfo2 != null)
                    {
                        val = ResolverErrorFilter.PopReader <T>(memberInfo2, iscounter: true);
                        if (val != null)
                        {
                            return(val);
                        }
                    }
                }
            }
            return(null);
        }