public override IDeepCopyable CopyTo(IDeepCopyable other) { var dest = other as DiagnosticOrderEventComponent; if (dest != null) { base.CopyTo(dest); if (StatusElement != null) { dest.StatusElement = (Code <Hl7.Fhir.Model.DiagnosticOrder.DiagnosticOrderStatus>)StatusElement.DeepCopy(); } if (Description != null) { dest.Description = (Hl7.Fhir.Model.CodeableConcept)Description.DeepCopy(); } if (DateTimeElement != null) { dest.DateTimeElement = (Hl7.Fhir.Model.FhirDateTime)DateTimeElement.DeepCopy(); } if (Actor != null) { dest.Actor = (Hl7.Fhir.Model.ResourceReference)Actor.DeepCopy(); } return(dest); } else { throw new ArgumentException("Can only copy to an object of the same type", "other"); } }
public override IDeepCopyable CopyTo(IDeepCopyable other) { var dest = other as Media; if (dest != null) { base.CopyTo(dest); if (TypeElement != null) { dest.TypeElement = (Code <Hl7.Fhir.Model.Media.MediaType>)TypeElement.DeepCopy(); } if (Subtype != null) { dest.Subtype = (Hl7.Fhir.Model.CodeableConcept)Subtype.DeepCopy(); } if (Identifier != null) { dest.Identifier = new List <Hl7.Fhir.Model.Identifier>(Identifier.DeepCopy()); } if (DateTimeElement != null) { dest.DateTimeElement = (Hl7.Fhir.Model.FhirDateTime)DateTimeElement.DeepCopy(); } if (Subject != null) { dest.Subject = (Hl7.Fhir.Model.ResourceReference)Subject.DeepCopy(); } if (Operator != null) { dest.Operator = (Hl7.Fhir.Model.ResourceReference)Operator.DeepCopy(); } if (View != null) { dest.View = (Hl7.Fhir.Model.CodeableConcept)View.DeepCopy(); } if (DeviceNameElement != null) { dest.DeviceNameElement = (Hl7.Fhir.Model.FhirString)DeviceNameElement.DeepCopy(); } if (HeightElement != null) { dest.HeightElement = (Hl7.Fhir.Model.Integer)HeightElement.DeepCopy(); } if (WidthElement != null) { dest.WidthElement = (Hl7.Fhir.Model.Integer)WidthElement.DeepCopy(); } if (FramesElement != null) { dest.FramesElement = (Hl7.Fhir.Model.Integer)FramesElement.DeepCopy(); } if (LengthElement != null) { dest.LengthElement = (Hl7.Fhir.Model.Integer)LengthElement.DeepCopy(); } if (Content != null) { dest.Content = (Hl7.Fhir.Model.Attachment)Content.DeepCopy(); } return(dest); } else { throw new ArgumentException("Can only copy to an object of the same type", "other"); } }