public override IDeepCopyable CopyTo(IDeepCopyable other) { var dest = other as DataElement; if (dest != null) { base.CopyTo(dest); if (UrlElement != null) { dest.UrlElement = (Hl7.Fhir.Model.FhirUri)UrlElement.DeepCopy(); } if (Identifier != null) { dest.Identifier = new List <Hl7.Fhir.Model.Identifier>(Identifier.DeepCopy()); } if (VersionElement != null) { dest.VersionElement = (Hl7.Fhir.Model.FhirString)VersionElement.DeepCopy(); } if (NameElement != null) { dest.NameElement = (Hl7.Fhir.Model.FhirString)NameElement.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 (PublisherElement != null) { dest.PublisherElement = (Hl7.Fhir.Model.FhirString)PublisherElement.DeepCopy(); } if (Contact != null) { dest.Contact = new List <Hl7.Fhir.Model.DataElement.ContactComponent>(Contact.DeepCopy()); } if (DateElement != null) { dest.DateElement = (Hl7.Fhir.Model.FhirDateTime)DateElement.DeepCopy(); } if (UseContext != null) { dest.UseContext = new List <Hl7.Fhir.Model.CodeableConcept>(UseContext.DeepCopy()); } if (CopyrightElement != null) { dest.CopyrightElement = (Hl7.Fhir.Model.FhirString)CopyrightElement.DeepCopy(); } if (StringencyElement != null) { dest.StringencyElement = (Code <Hl7.Fhir.Model.DataElement.DataElementStringency>)StringencyElement.DeepCopy(); } if (Mapping != null) { dest.Mapping = new List <Hl7.Fhir.Model.DataElement.MappingComponent>(Mapping.DeepCopy()); } if (Element != null) { dest.Element = new List <Hl7.Fhir.Model.ElementDefinition>(Element.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 ConceptMap; if (dest != null) { base.CopyTo(dest); if (IdentifierElement != null) { dest.IdentifierElement = (Hl7.Fhir.Model.FhirString)IdentifierElement.DeepCopy(); } if (VersionElement != null) { dest.VersionElement = (Hl7.Fhir.Model.FhirString)VersionElement.DeepCopy(); } if (NameElement != null) { dest.NameElement = (Hl7.Fhir.Model.FhirString)NameElement.DeepCopy(); } if (PublisherElement != null) { dest.PublisherElement = (Hl7.Fhir.Model.FhirString)PublisherElement.DeepCopy(); } if (Telecom != null) { dest.Telecom = new List <Hl7.Fhir.Model.Contact>(Telecom.DeepCopy()); } if (DescriptionElement != null) { dest.DescriptionElement = (Hl7.Fhir.Model.FhirString)DescriptionElement.DeepCopy(); } if (CopyrightElement != null) { dest.CopyrightElement = (Hl7.Fhir.Model.FhirString)CopyrightElement.DeepCopy(); } if (StatusElement != null) { dest.StatusElement = (Hl7.Fhir.Model.Code)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 (Source != null) { dest.Source = (Hl7.Fhir.Model.ResourceReference)Source.DeepCopy(); } if (Target != null) { dest.Target = (Hl7.Fhir.Model.ResourceReference)Target.DeepCopy(); } if (Concept != null) { dest.Concept = new List <Hl7.Fhir.Model.ConceptMap.ConceptMapConceptComponent>(Concept.DeepCopy()); } return(dest); } else { throw new ArgumentException("Can only copy to an object of the same type", "other"); } }