コード例 #1
0
ファイル: SigType.cs プロジェクト: davidleon/MOSA-Project
        /// <summary>
        /// Parses the SZ array signature.
        /// </summary>
        /// <param name="reader">The reader.</param>
        /// <returns></returns>
        private static SigType ParseSZArraySignature(SignatureReader reader)
        {
            CustomMod[] customMods  = CustomMod.ParseCustomMods(reader);
            SigType     elementType = ParseTypeSignature(reader);

            return(new SZArraySigType(customMods, elementType));
        }
コード例 #2
0
ファイル: SigType.cs プロジェクト: davidleon/MOSA-Project
        /// <summary>
        /// Parses the pointer.
        /// </summary>
        /// <param name="reader">The reader.</param>
        /// <returns></returns>
        private static SigType ParsePointer(SignatureReader reader)
        {
            CustomMod[] mods = CustomMod.ParseCustomMods(reader);
            SigType     type = ParseTypeSignature(reader);

            return(new PtrSigType(mods, type));
        }
コード例 #3
0
        /// <summary>
        /// Parses the SZ array signature.
        /// </summary>
        /// <param name="buffer">The buffer.</param>
        /// <param name="index">The index.</param>
        /// <returns></returns>
        private static SigType ParseSZArraySignature(byte[] buffer, ref int index)
        {
            CustomMod[] customMods  = CustomMod.ParseCustomMods(buffer, ref index);
            SigType     elementType = ParseTypeSignature(buffer, ref index);

            return(new SZArraySigType(customMods, elementType));
        }
コード例 #4
0
        /// <summary>
        /// Parses the pointer.
        /// </summary>
        /// <param name="buffer">The buffer.</param>
        /// <param name="index">The index.</param>
        /// <returns></returns>
        private static SigType ParsePointer(byte[] buffer, ref int index)
        {
            CustomMod[] mods = CustomMod.ParseCustomMods(buffer, ref index);
            SigType     type = ParseTypeSignature(buffer, ref index);

            return(new PtrSigType(mods, type));
        }
コード例 #5
0
ファイル: PtrSigType.cs プロジェクト: davidleon/MOSA-Project
        /// <summary>
        /// Indicates whether the current object is equal to another object of the same type.
        /// </summary>
        /// <param name="other">An object to compare with this object.</param>
        /// <returns>
        /// true if the current object is equal to the <paramref name="other"/> parameter; otherwise, false.
        /// </returns>
        public override bool Equals(SigType other)
        {
            PtrSigType pother = other as PtrSigType;

            if (null == pother)
            {
                return(false);
            }

            return(base.Equals(other) == true && this.elementType.Matches(pother.elementType) == true && CustomMod.Equals(this.customMods, pother.customMods));
        }
コード例 #6
0
        /// <summary>
        /// Indicates whether the current object is equal to another object of the same type.
        /// </summary>
        /// <param name="other">An object to compare with this object.</param>
        /// <returns>
        /// true if the current object is equal to the <paramref name="other"/> parameter; otherwise, false.
        /// </returns>
        public override bool Equals(SigType other)
        {
            SZArraySigType szast = other as SZArraySigType;

            if (szast == null)
            {
                return(false);
            }

            return(base.Equals(other) == true && _elementType.Equals(szast._elementType) && CustomMod.Equals(_customMods, szast._customMods));
        }