public override IDeepCopyable CopyTo(IDeepCopyable other) { var dest = other as DispenseComponent; if (dest != null) { base.CopyTo(dest); if (Product != null) { dest.Product = (Hl7.Fhir.Model.Coding)Product.DeepCopy(); } if (EyeElement != null) { dest.EyeElement = (Code <Hl7.Fhir.Model.VisionPrescription.VisionEyes>)EyeElement.DeepCopy(); } if (SphereElement != null) { dest.SphereElement = (Hl7.Fhir.Model.FhirDecimal)SphereElement.DeepCopy(); } if (CylinderElement != null) { dest.CylinderElement = (Hl7.Fhir.Model.FhirDecimal)CylinderElement.DeepCopy(); } if (AxisElement != null) { dest.AxisElement = (Hl7.Fhir.Model.Integer)AxisElement.DeepCopy(); } if (PrismElement != null) { dest.PrismElement = (Hl7.Fhir.Model.FhirDecimal)PrismElement.DeepCopy(); } if (BaseElement != null) { dest.BaseElement = (Code <Hl7.Fhir.Model.VisionPrescription.VisionBase>)BaseElement.DeepCopy(); } if (AddElement != null) { dest.AddElement = (Hl7.Fhir.Model.FhirDecimal)AddElement.DeepCopy(); } if (PowerElement != null) { dest.PowerElement = (Hl7.Fhir.Model.FhirDecimal)PowerElement.DeepCopy(); } if (BackCurveElement != null) { dest.BackCurveElement = (Hl7.Fhir.Model.FhirDecimal)BackCurveElement.DeepCopy(); } if (DiameterElement != null) { dest.DiameterElement = (Hl7.Fhir.Model.FhirDecimal)DiameterElement.DeepCopy(); } if (Duration != null) { dest.Duration = (Hl7.Fhir.Model.SimpleQuantity)Duration.DeepCopy(); } if (ColorElement != null) { dest.ColorElement = (Hl7.Fhir.Model.FhirString)ColorElement.DeepCopy(); } if (BrandElement != null) { dest.BrandElement = (Hl7.Fhir.Model.FhirString)BrandElement.DeepCopy(); } if (NotesElement != null) { dest.NotesElement = (Hl7.Fhir.Model.FhirString)NotesElement.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 SearchParameter; if (dest != null) { base.CopyTo(dest); if (UrlElement != null) { dest.UrlElement = (Hl7.Fhir.Model.FhirUri)UrlElement.DeepCopy(); } if (NameElement != null) { dest.NameElement = (Hl7.Fhir.Model.FhirString)NameElement.DeepCopy(); } if (PublisherElement != null) { dest.PublisherElement = (Hl7.Fhir.Model.FhirString)PublisherElement.DeepCopy(); } if (Contact != null) { dest.Contact = new List <Hl7.Fhir.Model.SearchParameter.SearchParameterContactComponent>(Contact.DeepCopy()); } if (RequirementsElement != null) { dest.RequirementsElement = (Hl7.Fhir.Model.FhirString)RequirementsElement.DeepCopy(); } if (StatusElement != null) { dest.StatusElement = (Code <Hl7.Fhir.Model.ConformanceResourceStatus>)StatusElement.DeepCopy(); } if (ExperimentalElement != null) { dest.ExperimentalElement = (Hl7.Fhir.Model.FhirBoolean)ExperimentalElement.DeepCopy(); } if (DateElement != null) { dest.DateElement = (Hl7.Fhir.Model.FhirDateTime)DateElement.DeepCopy(); } if (BaseElement != null) { dest.BaseElement = (Hl7.Fhir.Model.Code)BaseElement.DeepCopy(); } if (TypeElement != null) { dest.TypeElement = (Hl7.Fhir.Model.Code)TypeElement.DeepCopy(); } if (DescriptionElement != null) { dest.DescriptionElement = (Hl7.Fhir.Model.FhirString)DescriptionElement.DeepCopy(); } if (XpathElement != null) { dest.XpathElement = (Hl7.Fhir.Model.FhirString)XpathElement.DeepCopy(); } if (TargetElement != null) { dest.TargetElement = new List <Hl7.Fhir.Model.Code>(TargetElement.DeepCopy()); } return(dest); } else { throw new ArgumentException("Can only copy to an object of the same type", "other"); } }