Ejemplo n.º 1
0
        /**
         * Compares for reference equality and value equality.
         */
        public bool equals(IsPartOfPdu rhs)
        {
            bool ivarsEqual = true;

            if (rhs.GetType() != this.GetType())
            {
                return(false);
            }

            ivarsEqual = base.Equals(rhs);

            if (!(_orginatingEntityID.Equals(rhs._orginatingEntityID)))
            {
                ivarsEqual = false;
            }
            if (!(_receivingEntityID.Equals(rhs._receivingEntityID)))
            {
                ivarsEqual = false;
            }
            if (!(_relationship.Equals(rhs._relationship)))
            {
                ivarsEqual = false;
            }
            if (!(_partLocation.Equals(rhs._partLocation)))
            {
                ivarsEqual = false;
            }
            if (!(_namedLocationID.Equals(rhs._namedLocationID)))
            {
                ivarsEqual = false;
            }
            if (!(_partEntityType.Equals(rhs._partEntityType)))
            {
                ivarsEqual = false;
            }

            return(ivarsEqual);
        }
Ejemplo n.º 2
0
        /**
          * The equals method doesn't always work--mostly on on classes that consist only of primitives. Be careful.
          */
        public bool equals(IsPartOfPdu rhs)
        {
            bool ivarsEqual = true;

            if(rhs.GetType() != this.GetType())
            return false;

             if( ! (_orginatingEntityID.Equals( rhs._orginatingEntityID) )) ivarsEqual = false;
             if( ! (_receivingEntityID.Equals( rhs._receivingEntityID) )) ivarsEqual = false;
             if( ! (_relationship.Equals( rhs._relationship) )) ivarsEqual = false;
             if( ! (_partLocation.Equals( rhs._partLocation) )) ivarsEqual = false;
             if( ! (_namedLocationID.Equals( rhs._namedLocationID) )) ivarsEqual = false;
             if( ! (_partEntityType.Equals( rhs._partEntityType) )) ivarsEqual = false;

            return ivarsEqual;
        }