コード例 #1
0
        public sealed override bool Equals(Object obj)
        {
            EcmaFormatRuntimeFieldInfo other = obj as EcmaFormatRuntimeFieldInfo;

            if (other == null)
            {
                return(false);
            }
            if (!(_reader == other._reader))
            {
                return(false);
            }
            if (!(_fieldHandle.Equals(other._fieldHandle)))
            {
                return(false);
            }
            if (!(_contextTypeInfo.Equals(other._contextTypeInfo)))
            {
                return(false);
            }
            if (!(_reflectedType.Equals(other._reflectedType)))
            {
                return(false);
            }
            return(true);
        }
コード例 #2
0
        public sealed override bool HasSameMetadataDefinitionAs(MemberInfo other)
        {
            if (other == null)
            {
                throw new ArgumentNullException(nameof(other));
            }

            EcmaFormatRuntimeFieldInfo otherField = other as EcmaFormatRuntimeFieldInfo;

            if (otherField == null)
            {
                return(false);
            }
            if (!(_reader == otherField._reader))
            {
                return(false);
            }
            if (!(_fieldHandle.Equals(otherField._fieldHandle)))
            {
                return(false);
            }
            return(true);
        }