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

                if (dest != null)
                {
                    base.CopyTo(dest);
                    if (IdentifierElement != null)
                    {
                        dest.IdentifierElement = (Hl7.Fhir.Model.FhirUri)IdentifierElement.DeepCopy();
                    }
                    if (OutcomeElement != null)
                    {
                        dest.OutcomeElement = (Code <Hl7.Fhir.Model.Query.QueryOutcome>)OutcomeElement.DeepCopy();
                    }
                    if (TotalElement != null)
                    {
                        dest.TotalElement = (Hl7.Fhir.Model.Integer)TotalElement.DeepCopy();
                    }
                    if (Parameter != null)
                    {
                        dest.Parameter = new List <Hl7.Fhir.Model.Extension>(Parameter.DeepCopy());
                    }
                    if (First != null)
                    {
                        dest.First = new List <Hl7.Fhir.Model.Extension>(First.DeepCopy());
                    }
                    if (Previous != null)
                    {
                        dest.Previous = new List <Hl7.Fhir.Model.Extension>(Previous.DeepCopy());
                    }
                    if (Next != null)
                    {
                        dest.Next = new List <Hl7.Fhir.Model.Extension>(Next.DeepCopy());
                    }
                    if (Last != null)
                    {
                        dest.Last = new List <Hl7.Fhir.Model.Extension>(Last.DeepCopy());
                    }
                    if (Reference != null)
                    {
                        dest.Reference = new List <Hl7.Fhir.Model.ResourceReference>(Reference.DeepCopy());
                    }
                    return(dest);
                }
                else
                {
                    throw new ArgumentException("Can only copy to an object of the same type", "other");
                }
            }