Ejemplo n.º 1
0
        // Token: 0x060015A6 RID: 5542 RVA: 0x00067128 File Offset: 0x00065328
        public static DataContractAttribute GetDataContractAttribute(Type type)
        {
            Type type2 = type;

            while (type2 != null)
            {
                DataContractAttribute attribute = Class_471 <DataContractAttribute> .GetAttribute(type2);

                if (attribute != null)
                {
                    return(attribute);
                }
                type2 = type2.BaseType;
            }
            return(null);
        }
Ejemplo n.º 2
0
        // Token: 0x060015A7 RID: 5543 RVA: 0x0006715C File Offset: 0x0006535C
        public static DataMemberAttribute GetDataMemberAttribute(MemberInfo memberInfo)
        {
            if (memberInfo.MemberType == MemberTypes.Field)
            {
                return(Class_471 <DataMemberAttribute> .GetAttribute(memberInfo));
            }
            PropertyInfo        propertyInfo = (PropertyInfo)memberInfo;
            DataMemberAttribute attribute    = Class_471 <DataMemberAttribute> .GetAttribute(propertyInfo);

            if (attribute == null && propertyInfo.IsVirtual())
            {
                Type type = propertyInfo.DeclaringType;
                while (attribute == null && type != null)
                {
                    PropertyInfo propertyInfo2 = (PropertyInfo)Class_514.GetMemberInfoFromType(type, propertyInfo);
                    if (propertyInfo2 != null && propertyInfo2.IsVirtual())
                    {
                        attribute = Class_471 <DataMemberAttribute> .GetAttribute(propertyInfo2);
                    }
                    type = type.BaseType;
                }
            }
            return(attribute);
        }
Ejemplo n.º 3
0
 // Token: 0x060015A5 RID: 5541 RVA: 0x0006711D File Offset: 0x0006531D
 public static T GetCachedAttribute <T>(object attributeProvider) where T : Attribute
 {
     return(Class_471 <T> .GetAttribute(attributeProvider));
 }