Esempio n. 1
0
            public override IDeepCopyable CopyTo(IDeepCopyable other)
            {
                var dest = other as OperationOutcomeIssueComponent;

                if (dest != null)
                {
                    base.CopyTo(dest);
                    if (SeverityElement != null)
                    {
                        dest.SeverityElement = (Code <Hl7.Fhir.Model.OperationOutcome.IssueSeverity>)SeverityElement.DeepCopy();
                    }
                    if (Code != null)
                    {
                        dest.Code = (Hl7.Fhir.Model.CodeableConcept)Code.DeepCopy();
                    }
                    if (DetailsElement != null)
                    {
                        dest.DetailsElement = (Hl7.Fhir.Model.FhirString)DetailsElement.DeepCopy();
                    }
                    if (LocationElement != null)
                    {
                        dest.LocationElement = new List <Hl7.Fhir.Model.FhirString>(LocationElement.DeepCopy());
                    }
                    return(dest);
                }
                else
                {
                    throw new ArgumentException("Can only copy to an object of the same type", "other");
                }
            }
Esempio n. 2
0
            public override IDeepCopyable CopyTo(IDeepCopyable other)
            {
                var dest = other as CarePlanActivitySimpleComponent;

                if (dest != null)
                {
                    base.CopyTo(dest);
                    if (CategoryElement != null)
                    {
                        dest.CategoryElement = (Code <Hl7.Fhir.Model.CarePlan.CarePlanActivityCategory>)CategoryElement.DeepCopy();
                    }
                    if (Code != null)
                    {
                        dest.Code = (Hl7.Fhir.Model.CodeableConcept)Code.DeepCopy();
                    }
                    if (Timing != null)
                    {
                        dest.Timing = (Hl7.Fhir.Model.Element)Timing.DeepCopy();
                    }
                    if (Location != null)
                    {
                        dest.Location = (Hl7.Fhir.Model.ResourceReference)Location.DeepCopy();
                    }
                    if (Performer != null)
                    {
                        dest.Performer = new List <Hl7.Fhir.Model.ResourceReference>(Performer.DeepCopy());
                    }
                    if (Product != null)
                    {
                        dest.Product = (Hl7.Fhir.Model.ResourceReference)Product.DeepCopy();
                    }
                    if (DailyAmount != null)
                    {
                        dest.DailyAmount = (Hl7.Fhir.Model.Quantity)DailyAmount.DeepCopy();
                    }
                    if (Quantity != null)
                    {
                        dest.Quantity = (Hl7.Fhir.Model.Quantity)Quantity.DeepCopy();
                    }
                    if (DetailsElement != null)
                    {
                        dest.DetailsElement = (Hl7.Fhir.Model.FhirString)DetailsElement.DeepCopy();
                    }
                    return(dest);
                }
                else
                {
                    throw new ArgumentException("Can only copy to an object of the same type", "other");
                }
            }