Exemplo n.º 1
0
        public bool Equals(MethodTable other)
        {
            return(m_dwFlags.Equals(other.m_dwFlags) &&
                   m_BaseSize == other.m_BaseSize &&
                   m_wFlags2 == other.m_wFlags2 &&
                   m_wToken == other.m_wToken &&
                   m_wNumVirtuals == other.m_wNumVirtuals &&
                   m_wNumInterfaces == other.m_wNumInterfaces &&
                   m_pParentMethodTable == other.m_pParentMethodTable &&
                   m_pLoaderModule == other.m_pLoaderModule &&
                   m_pWriteableData == other.m_pWriteableData &&
                   m_pEEClass == other.m_pEEClass &&
                   m_pCanonMT == other.m_pCanonMT);

            // && m_slotInfo.Equals(other.m_slotInfo)
            // && m_mapSlot.Equals(other.m_mapSlot);
        }
Exemplo n.º 2
0
        public override bool Equals(object obj)
        {
            if (obj.GetType() == this.GetType())
            {
                var  mtOther   = (MethodTable)obj;
                bool dwFlagsEq = m_dwFlags.Equals(mtOther.m_dwFlags);
                bool sizesEq   = m_BaseSize == mtOther.m_BaseSize && ComponentSize == mtOther.ComponentSize;
                bool flags2Eq  = m_wFlags2 == mtOther.m_wFlags2;
                bool numEq     = NumInterfaces == mtOther.NumInterfaces && NumVirtuals == mtOther.NumVirtuals;
                bool tokenEq   = Token == mtOther.Token;
                bool parentEq  = Parent == mtOther.Parent;
                bool moduleEq  = Module == mtOther.Module;
                bool eeEq      = m_pEEClass == mtOther.m_pEEClass && m_pCanonMT == mtOther.m_pCanonMT;

                return(dwFlagsEq && sizesEq && flags2Eq && numEq && tokenEq && parentEq && moduleEq && eeEq);
            }

            return(false);
        }