/// <summary> /// <b>Deep</b> copies this instance. /// </summary> /// <returns> /// A <b>deep</b> copy of the current object. /// </returns> public ExceptionOccurrence Copy() { var exception = new ExceptionOccurrence(); exception.CopyFrom(this); return(exception); }
/// <summary> /// Copies from. /// </summary> /// <param name="other">The other.</param> public void CopyFrom(ExceptionOccurrence other) { if (this.GetType().FullName != other.GetType().FullName) { throw new ArgumentException("Invalid type"); } this.ExceptionDate = other.ExceptionDate; if (other.Appointment != null) { this.Appointment = other.Appointment.Copy(); } }