/// <summary> /// Create a new TripViewModel from another one, copying its state. /// </summary> /// <param name="original">The existing TripViewModel to clone from.</param> public TripViewModel(TripViewModel original) { this.Name = original.Name; this.StartDate = original.StartDate; this.Duration = original.Duration; }
/// <summary> /// Add a trip to the VacationManager. /// </summary> /// <remarks>Takes a copy of the provided TripViewModel, and does not retain references to the provided TripViewModel</remarks> /// <param name="trip">The trip to add.</param> public void AddTrip(TripViewModel trip) { Trips.Add(new TripViewModel(trip)); }