/// <summary>Makes a deep copy of the current TrainBaselineStatusExtendedData object.</summary> /// <returns>A copy of the original object.</returns> public TrainBaselineStatusExtendedData Clone() { TrainBaselineStatusExtendedData lExtendedCopy = (TrainBaselineStatusExtendedData)this.MemberwiseClone(); if (Status != null) { lExtendedCopy.Status = Status.Clone(); } return(lExtendedCopy); }
/// <summary>Compares the content of two TrainBaselineStatusExtendedData objects.</summary> /// <param name="object1">First object to be compared.</param> /// <param name="object2">Second object to be compared.</param> /// <returns>true if equal, false if not.</returns> public static bool AreEqual(TrainBaselineStatusExtendedData object1, TrainBaselineStatusExtendedData object2) { bool lEqual = object1 != null && object2 != null && object1.AssignedFutureBaseline == object2.AssignedFutureBaseline && object1.AssignedCurrentBaseline == object2.AssignedCurrentBaseline && object1.IsT2GPollingRequired == object2.IsT2GPollingRequired && object1.OnBoardFutureBaseline == object2.OnBoardFutureBaseline && TrainBaselineStatusData.AreEqual(object1.Status, object2.Status); return(lEqual); }