Esempio n. 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");
                }
            }
Esempio n. 2
0
            public override IDeepCopyable CopyTo(IDeepCopyable other)
            {
                var dest = other as ParticipantComponent;

                if (dest != null)
                {
                    base.CopyTo(dest);
                    if (Type != null)
                    {
                        dest.Type = new List <Hl7.Fhir.Model.CodeableConcept>(Type.DeepCopy());
                    }
                    if (Actor != null)
                    {
                        dest.Actor = (Hl7.Fhir.Model.ResourceReference)Actor.DeepCopy();
                    }
                    if (RequiredElement != null)
                    {
                        dest.RequiredElement = (Code <Hl7.Fhir.Model.Appointment.ParticipantRequired>)RequiredElement.DeepCopy();
                    }
                    if (StatusElement != null)
                    {
                        dest.StatusElement = (Code <Hl7.Fhir.Model.Appointment.ParticipationStatus>)StatusElement.DeepCopy();
                    }
                    return(dest);
                }
                else
                {
                    throw new ArgumentException("Can only copy to an object of the same type", "other");
                }
            }
Esempio n. 3
0
 /// <summary>
 /// Creates a new WWPlaceMenuItem given a name, handle, and requirements
 /// </summary>
 /// <param name="name">The name of the menu item</param>
 /// <param name="handler">The event handler that gets called when the item is clicked</param>
 /// <param name="requires">Elements that need to be present in the list for item to be enabled</param>
 public WWPlaceMenuItem(string name, EventHandler handler, RequiredElement requires)
     : base(name, handler)
 {
     Requires = requires;
 }
Esempio n. 4
0
 /// <summary>
 /// Creates a new WWPlaceMenuItem given a name, handle, and requirements
 /// </summary>
 /// <param name="name">The name of the menu item</param>
 /// <param name="handler">The event handler that gets called when the item is clicked</param>
 /// <param name="requires">Elements that need to be present in the list for item to be enabled</param>
 public WWPlaceMenuItem(string name, EventHandler handler, RequiredElement requires)
    : base(name, handler)
 {
    Requires = requires;
 }
      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;
      }