Esempio n. 1
0
        /// <summary>
        /// Compare equality between two packets.
        /// </summary>
        /// <param name="thisPacket"></param>
        /// <param name="otherPacket"></param>
        /// <returns>True if they encode the same data, false otherwise or if 1 is null</returns>
        public static bool equals(RequestPacket thisPacket, RequestPacket otherPacket)
        {
            if ((thisPacket == null) || (otherPacket == null))
            {
                return(false);
            }

            return((thisPacket.DeltaX == otherPacket.DeltaX) && (thisPacket.DeltaZ == otherPacket.DeltaZ) &&
                   (thisPacket.DeltaRot == otherPacket.DeltaRot) && (IdPacket.equals(thisPacket.IdData, otherPacket.IdData)) &&
                   (thisPacket.ToolRequest == otherPacket.ToolRequest) && (thisPacket.ToolMode == otherPacket.ToolMode));
        }