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

            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.FHIRAllTypes>)TypeElement.DeepCopy();
            }
            if (ProfileElement != null)
            {
                dest.ProfileElement = new List <Hl7.Fhir.Model.Canonical>(ProfileElement.DeepCopy());
            }
            if (Subject != null)
            {
                dest.Subject = (Hl7.Fhir.Model.DataType)Subject.DeepCopy();
            }
            if (MustSupportElement != null)
            {
                dest.MustSupportElement = new List <Hl7.Fhir.Model.FhirString>(MustSupportElement.DeepCopy());
            }
            if (CodeFilter != null)
            {
                dest.CodeFilter = new List <Hl7.Fhir.Model.DataRequirement.CodeFilterComponent>(CodeFilter.DeepCopy());
            }
            if (DateFilter != null)
            {
                dest.DateFilter = new List <Hl7.Fhir.Model.DataRequirement.DateFilterComponent>(DateFilter.DeepCopy());
            }
            if (LimitElement != null)
            {
                dest.LimitElement = (Hl7.Fhir.Model.PositiveInt)LimitElement.DeepCopy();
            }
            if (Sort != null)
            {
                dest.Sort = new List <Hl7.Fhir.Model.DataRequirement.SortComponent>(Sort.DeepCopy());
            }
            return(dest);
        }