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

                if (dest != null)
                {
                    base.CopyTo(dest);
                    if (LinkIdElement != null)
                    {
                        dest.LinkIdElement = (Hl7.Fhir.Model.FhirString)LinkIdElement.DeepCopy();
                    }
                    if (Concept != null)
                    {
                        dest.Concept = new List <Hl7.Fhir.Model.Coding>(Concept.DeepCopy());
                    }
                    if (TextElement != null)
                    {
                        dest.TextElement = (Hl7.Fhir.Model.FhirString)TextElement.DeepCopy();
                    }
                    if (TypeElement != null)
                    {
                        dest.TypeElement = (Code <Hl7.Fhir.Model.Questionnaire.AnswerFormat>)TypeElement.DeepCopy();
                    }
                    if (RequiredElement != null)
                    {
                        dest.RequiredElement = (Hl7.Fhir.Model.FhirBoolean)RequiredElement.DeepCopy();
                    }
                    if (RepeatsElement != null)
                    {
                        dest.RepeatsElement = (Hl7.Fhir.Model.FhirBoolean)RepeatsElement.DeepCopy();
                    }
                    if (Options != null)
                    {
                        dest.Options = (Hl7.Fhir.Model.ResourceReference)Options.DeepCopy();
                    }
                    if (Option != null)
                    {
                        dest.Option = new List <Hl7.Fhir.Model.Coding>(Option.DeepCopy());
                    }
                    if (Group != null)
                    {
                        dest.Group = new List <Hl7.Fhir.Model.Questionnaire.GroupComponent>(Group.DeepCopy());
                    }
                    return(dest);
                }
                else
                {
                    throw new ArgumentException("Can only copy to an object of the same type", "other");
                }
            }
      public override IDeepCopyable CopyTo(IDeepCopyable other)
      {
        var dest = other as GroupComponent;

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

        base.CopyTo(dest);
        if(LinkIdElement != null) dest.LinkIdElement = (Hl7.Fhir.Model.FhirString)LinkIdElement.DeepCopy();
        if(TitleElement != null) dest.TitleElement = (Hl7.Fhir.Model.FhirString)TitleElement.DeepCopy();
        if(Concept != null) dest.Concept = new List<Hl7.Fhir.Model.Coding>(Concept.DeepCopy());
        if(TextElement != null) dest.TextElement = (Hl7.Fhir.Model.FhirString)TextElement.DeepCopy();
        if(RequiredElement != null) dest.RequiredElement = (Hl7.Fhir.Model.FhirBoolean)RequiredElement.DeepCopy();
        if(RepeatsElement != null) dest.RepeatsElement = (Hl7.Fhir.Model.FhirBoolean)RepeatsElement.DeepCopy();
        if(Group != null) dest.Group = new List<Hl7.Fhir.Model.Questionnaire.GroupComponent>(Group.DeepCopy());
        if(Question != null) dest.Question = new List<Hl7.Fhir.Model.Questionnaire.QuestionComponent>(Question.DeepCopy());
        return dest;
      }