Exemplo n.º 1
0
		/// <summary>
		/// Выполняет полное копирование текущего объекта
		/// </summary>
		/// <returns>Результат копирования, приведённый к типу данного класса</returns>
		public FlightPair FullCopy()
		{
			var result = new FlightPair();
			result.ArrivalPoint = new RequestedTripPoint();
			result.DepaturePoint = new RequestedTripPoint();

			result.DepatureDateTime = DepatureDateTime;
			result.MaxDepatureTime = MaxDepatureTime;

			result.ArrivalPoint.Code = ArrivalPoint.Code;
			result.ArrivalPoint.IsCity = ArrivalPoint.IsCity;

			result.DepaturePoint.Code = DepaturePoint.Code;
			result.DepaturePoint.IsCity = DepaturePoint.IsCity;
			

			return result;
		}
Exemplo n.º 2
0
        /// <summary>
        /// Выполняет полное копирование текущего объекта
        /// </summary>
        /// <returns>Результат копирования, приведённый к типу данного класса</returns>
        public FlightPair FullCopy()
        {
            var result = new FlightPair();

            result.ArrivalPoint  = new RequestedTripPoint();
            result.DepaturePoint = new RequestedTripPoint();

            result.DepatureDateTime = DepatureDateTime;
            result.MaxDepatureTime  = MaxDepatureTime;

            result.ArrivalPoint.Code   = ArrivalPoint.Code;
            result.ArrivalPoint.IsCity = ArrivalPoint.IsCity;

            result.DepaturePoint.Code   = DepaturePoint.Code;
            result.DepaturePoint.IsCity = DepaturePoint.IsCity;


            return(result);
        }
Exemplo n.º 3
0
        /// <summary>
        /// Выполняет полное копирование текущего объекта
        /// </summary>
        /// <returns>Результат копирования, приведённый к типу данного класса</returns>
        public FlightPair FullCopy()
        {
            var result = new FlightPair();

            result.ArrivalPoint   = new RequestedTripPoint();
            result.DeparturePoint = new RequestedTripPoint();

            result.DepatureDateTime = DepatureDateTime;
            result.MaxDepatureTime  = MaxDepatureTime;

            result.ArrivalPoint.Code   = ArrivalPoint.Code;
            result.ArrivalPoint.IsCity = ArrivalPoint.IsCity;

            if (ArrivalAltPoints != null)
            {
                result.ArrivalAltPoints = new RequestedTripPointList();
                foreach (var point in ArrivalAltPoints)
                {
                    result.ArrivalAltPoints.Add(point.FullCopy());
                }
            }

            result.DeparturePoint.Code   = DeparturePoint.Code;
            result.DeparturePoint.IsCity = DeparturePoint.IsCity;

            if (DepatureAltPoints != null)
            {
                result.DepatureAltPoints = new RequestedTripPointList();
                foreach (var point in DepatureAltPoints)
                {
                    result.DepatureAltPoints.Add(point.FullCopy());
                }
            }

            return(result);
        }