コード例 #1
0
        /// <summary>Adds a node.</summary>
        /// <param name="concept">The concept.</param>
        /// <returns>A FhirConceptTreeNode.</returns>
        public FhirConceptTreeNode AddChild(FhirConcept concept)
        {
            if (concept == null)
            {
                return(null);
            }

            if (_children.ContainsKey(concept.Code))
            {
                return(_children[concept.Code]);
            }

            FhirConceptTreeNode node = new FhirConceptTreeNode(concept, this);

            _children.Add(concept.Code, node);

            return(node);
        }
コード例 #2
0
 /// <summary>Initializes a new instance of the <see cref="FhirConceptTreeNode"/> class.</summary>
 /// <param name="concept">The concept.</param>
 /// <param name="parent"> The parent.</param>
 public FhirConceptTreeNode(FhirConcept concept, FhirConceptTreeNode parent)
 {
     _concept  = concept;
     _children = new Dictionary <string, FhirConceptTreeNode>();
     _parent   = parent;
 }