예제 #1
0
        /**
         * Compares for reference equality and value equality.
         */
        public bool equals(GriddedDataPdu rhs)
        {
            bool ivarsEqual = true;

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

            ivarsEqual = base.Equals(rhs);

            if (!(_environmentalSimulationApplicationID.Equals(rhs._environmentalSimulationApplicationID)))
            {
                ivarsEqual = false;
            }
            if (!(_fieldNumber == rhs._fieldNumber))
            {
                ivarsEqual = false;
            }
            if (!(_pduNumber == rhs._pduNumber))
            {
                ivarsEqual = false;
            }
            if (!(_pduTotal == rhs._pduTotal))
            {
                ivarsEqual = false;
            }
            if (!(_coordinateSystem == rhs._coordinateSystem))
            {
                ivarsEqual = false;
            }
            if (!(_numberOfGridAxes == rhs._numberOfGridAxes))
            {
                ivarsEqual = false;
            }
            if (!(_constantGrid == rhs._constantGrid))
            {
                ivarsEqual = false;
            }
            if (!(_environmentType.Equals(rhs._environmentType)))
            {
                ivarsEqual = false;
            }
            if (!(_orientation.Equals(rhs._orientation)))
            {
                ivarsEqual = false;
            }
            if (!(_sampleTime == rhs._sampleTime))
            {
                ivarsEqual = false;
            }
            if (!(_totalValues == rhs._totalValues))
            {
                ivarsEqual = false;
            }
            if (!(_vectorDimension == rhs._vectorDimension))
            {
                ivarsEqual = false;
            }
            if (!(_padding1 == rhs._padding1))
            {
                ivarsEqual = false;
            }
            if (!(_padding2 == rhs._padding2))
            {
                ivarsEqual = false;
            }

            if (!(_gridDataList.Count == rhs._gridDataList.Count))
            {
                ivarsEqual = false;
            }
            if (ivarsEqual)
            {
                for (int idx = 0; idx < _gridDataList.Count; idx++)
                {
                    if (!(_gridDataList[idx].Equals(rhs._gridDataList[idx])))
                    {
                        ivarsEqual = false;
                    }
                }
            }


            return(ivarsEqual);
        }
예제 #2
0
        /**
         * Compares for reference equality and value equality.
         */
        public bool equals(GriddedDataPdu rhs)
        {
            bool ivarsEqual = true;

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

            ivarsEqual = base.Equals(rhs);

            if( ! (_environmentalSimulationApplicationID.Equals( rhs._environmentalSimulationApplicationID) )) ivarsEqual = false;
            if( ! (_fieldNumber == rhs._fieldNumber)) ivarsEqual = false;
            if( ! (_pduNumber == rhs._pduNumber)) ivarsEqual = false;
            if( ! (_pduTotal == rhs._pduTotal)) ivarsEqual = false;
            if( ! (_coordinateSystem == rhs._coordinateSystem)) ivarsEqual = false;
            if( ! (_numberOfGridAxes == rhs._numberOfGridAxes)) ivarsEqual = false;
            if( ! (_constantGrid == rhs._constantGrid)) ivarsEqual = false;
            if( ! (_environmentType.Equals( rhs._environmentType) )) ivarsEqual = false;
            if( ! (_orientation.Equals( rhs._orientation) )) ivarsEqual = false;
            if( ! (_sampleTime == rhs._sampleTime)) ivarsEqual = false;
            if( ! (_totalValues == rhs._totalValues)) ivarsEqual = false;
            if( ! (_vectorDimension == rhs._vectorDimension)) ivarsEqual = false;
            if( ! (_padding1 == rhs._padding1)) ivarsEqual = false;
            if( ! (_padding2 == rhs._padding2)) ivarsEqual = false;

            if( ! (_gridDataList.Count == rhs._gridDataList.Count)) ivarsEqual = false;
            if(ivarsEqual)
            {
                for(int idx = 0; idx < _gridDataList.Count; idx++)
                {
                    if( ! ( _gridDataList[idx].Equals(rhs._gridDataList[idx]))) ivarsEqual = false;
                }
            }

            return ivarsEqual;
        }