Ejemplo n.º 1
0
        public override IDeepCopyable CopyTo(IDeepCopyable other)
        {
            var dest = other as ImagingObjectSelection;

            if (dest != null)
            {
                base.CopyTo(dest);
                if (UidElement != null)
                {
                    dest.UidElement = (Hl7.Fhir.Model.Oid)UidElement.DeepCopy();
                }
                if (Patient != null)
                {
                    dest.Patient = (Hl7.Fhir.Model.ResourceReference)Patient.DeepCopy();
                }
                if (Title != null)
                {
                    dest.Title = (Hl7.Fhir.Model.CodeableConcept)Title.DeepCopy();
                }
                if (DescriptionElement != null)
                {
                    dest.DescriptionElement = (Hl7.Fhir.Model.FhirString)DescriptionElement.DeepCopy();
                }
                if (Author != null)
                {
                    dest.Author = (Hl7.Fhir.Model.ResourceReference)Author.DeepCopy();
                }
                if (AuthoringTimeElement != null)
                {
                    dest.AuthoringTimeElement = (Hl7.Fhir.Model.FhirDateTime)AuthoringTimeElement.DeepCopy();
                }
                if (Study != null)
                {
                    dest.Study = new List <Hl7.Fhir.Model.ImagingObjectSelection.StudyComponent>(Study.DeepCopy());
                }
                return(dest);
            }
            else
            {
                throw new ArgumentException("Can only copy to an object of the same type", "other");
            }
        }
Ejemplo n.º 2
0
        public override IDeepCopyable CopyTo(IDeepCopyable other)
        {
            var dest = other as ImagingManifest;

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

            base.CopyTo(dest);
            if (Identifier != null)
            {
                dest.Identifier = (Hl7.Fhir.Model.Identifier)Identifier.DeepCopy();
            }
            if (Patient != null)
            {
                dest.Patient = (Hl7.Fhir.Model.ResourceReference)Patient.DeepCopy();
            }
            if (AuthoringTimeElement != null)
            {
                dest.AuthoringTimeElement = (Hl7.Fhir.Model.FhirDateTime)AuthoringTimeElement.DeepCopy();
            }
            if (Author != null)
            {
                dest.Author = (Hl7.Fhir.Model.ResourceReference)Author.DeepCopy();
            }
            if (DescriptionElement != null)
            {
                dest.DescriptionElement = (Hl7.Fhir.Model.FhirString)DescriptionElement.DeepCopy();
            }
            if (Study != null)
            {
                dest.Study = new List <Hl7.Fhir.Model.ImagingManifest.StudyComponent>(Study.DeepCopy());
            }
            return(dest);
        }