コード例 #1
0
        /// <summary>
        /// compare element by element with another instance Data collection
        /// equal content = equal collections = equal objects
        /// </summary>
        public bool Equals(TravelFragment other)
        {
            if (other == null)
            {
                return(false);
            }


            var otherData = other.GetDataCopy();

            if (_data.Count != otherData.Count)
            {
                return(false);
            }

            bool equals = true;

            for (int idx = 0; idx < _data.Count; idx++)
            {
                equals &= _data[idx].Equals(otherData[idx]);
            }
            return(equals);
        }
コード例 #2
0
 public void AddFragmentData(TravelFragment addFragment)
 {
     _data.AddRange(addFragment.GetDataCopy());
 }