Пример #1
0
            public override IDeepCopyable CopyTo(IDeepCopyable other)
            {
                var dest = other as ProtocolComponent;

                if (dest != null)
                {
                    base.CopyTo(dest);
                    if (DoseSequenceElement != null)
                    {
                        dest.DoseSequenceElement = (Hl7.Fhir.Model.Integer)DoseSequenceElement.DeepCopy();
                    }
                    if (DescriptionElement != null)
                    {
                        dest.DescriptionElement = (Hl7.Fhir.Model.FhirString)DescriptionElement.DeepCopy();
                    }
                    if (Authority != null)
                    {
                        dest.Authority = (Hl7.Fhir.Model.ResourceReference)Authority.DeepCopy();
                    }
                    if (SeriesElement != null)
                    {
                        dest.SeriesElement = (Hl7.Fhir.Model.FhirString)SeriesElement.DeepCopy();
                    }
                    return(dest);
                }
                else
                {
                    throw new ArgumentException("Can only copy to an object of the same type", "other");
                }
            }
Пример #2
0
            public override IDeepCopyable CopyTo(IDeepCopyable other)
            {
                var dest = other as VaccinationProtocolComponent;

                if (dest != null)
                {
                    base.CopyTo(dest);
                    if (DoseSequenceElement != null)
                    {
                        dest.DoseSequenceElement = (Hl7.Fhir.Model.PositiveInt)DoseSequenceElement.DeepCopy();
                    }
                    if (DescriptionElement != null)
                    {
                        dest.DescriptionElement = (Hl7.Fhir.Model.FhirString)DescriptionElement.DeepCopy();
                    }
                    if (Authority != null)
                    {
                        dest.Authority = (Hl7.Fhir.Model.ResourceReference)Authority.DeepCopy();
                    }
                    if (SeriesElement != null)
                    {
                        dest.SeriesElement = (Hl7.Fhir.Model.FhirString)SeriesElement.DeepCopy();
                    }
                    if (SeriesDosesElement != null)
                    {
                        dest.SeriesDosesElement = (Hl7.Fhir.Model.PositiveInt)SeriesDosesElement.DeepCopy();
                    }
                    if (TargetDisease != null)
                    {
                        dest.TargetDisease = new List <Hl7.Fhir.Model.CodeableConcept>(TargetDisease.DeepCopy());
                    }
                    if (DoseStatus != null)
                    {
                        dest.DoseStatus = (Hl7.Fhir.Model.CodeableConcept)DoseStatus.DeepCopy();
                    }
                    if (DoseStatusReason != null)
                    {
                        dest.DoseStatusReason = (Hl7.Fhir.Model.CodeableConcept)DoseStatusReason.DeepCopy();
                    }
                    return(dest);
                }
                else
                {
                    throw new ArgumentException("Can only copy to an object of the same type", "other");
                }
            }