Beispiel #1
0
        public override IDeepCopyable CopyTo(IDeepCopyable other)
        {
            var dest = other as RelatedArtifact;

            if (dest == null)
            {
                throw new ArgumentException("Can only copy to an object of the same type", "other");
            }

            base.CopyTo(dest);
            if (TypeElement != null)
            {
                dest.TypeElement = (Code <Hl7.Fhir.Model.RelatedArtifact.RelatedArtifactType>)TypeElement.DeepCopy();
            }
            if (LabelElement != null)
            {
                dest.LabelElement = (Hl7.Fhir.Model.FhirString)LabelElement.DeepCopy();
            }
            if (DisplayElement != null)
            {
                dest.DisplayElement = (Hl7.Fhir.Model.FhirString)DisplayElement.DeepCopy();
            }
            if (Citation != null)
            {
                dest.Citation = (Hl7.Fhir.Model.Markdown)Citation.DeepCopy();
            }
            if (UrlElement != null)
            {
                dest.UrlElement = (Hl7.Fhir.Model.FhirUrl)UrlElement.DeepCopy();
            }
            if (Document != null)
            {
                dest.Document = (Hl7.Fhir.Model.Attachment)Document.DeepCopy();
            }
            if (ResourceElement != null)
            {
                dest.ResourceElement = (Hl7.Fhir.Model.Canonical)ResourceElement.DeepCopy();
            }
            return(dest);
        }