Exemplo n.º 1
0
        internal static bool IsDefined(RuntimeFieldInfo field, RuntimeType caType)
        {
            bool flag = caType == (RuntimeType)typeof(object) || caType == (RuntimeType)typeof(Attribute);

            return((flag || !(PseudoCustomAttribute.s_pca.GetValueOrDefault(caType) == null)) && (((flag || caType == (RuntimeType)typeof(MarshalAsAttribute)) && MarshalAsAttribute.IsDefined(field)) || ((flag || caType == (RuntimeType)typeof(FieldOffsetAttribute)) && FieldOffsetAttribute.IsDefined(field)) || ((flag || caType == (RuntimeType)typeof(NonSerializedAttribute)) && NonSerializedAttribute.IsDefined(field))));
        }
Exemplo n.º 2
0
        internal static bool IsDefined(RuntimeFieldInfo field, Type caType)
        {
            bool flag = (caType == typeof(object)) || (caType == typeof(Attribute));

            if (!flag && (s_pca[caType] == null))
            {
                return(false);
            }
            return(((flag || (caType == typeof(MarshalAsAttribute))) && MarshalAsAttribute.IsDefined(field)) || (((flag || (caType == typeof(FieldOffsetAttribute))) && FieldOffsetAttribute.IsDefined(field)) || ((flag || (caType == typeof(NonSerializedAttribute))) && NonSerializedAttribute.IsDefined(field))));
        }