コード例 #1
0
        /// <summary>
        /// Get TaxonTreeNode instance with data
        /// from WebTaxonTreeNode instance.
        /// </summary>
        /// <param name="webTaxonTree">WebTaxonTreeNode instance with data.</param>
        /// <returns>TaxonTreeNode instance.</returns>
        private static TaxonTreeNode GetTaxonTree(WebTaxonTreeNode webTaxonTree)
        {
            TaxonTreeNode taxonTree;

            taxonTree = new TaxonTreeNode(GetTaxon(webTaxonTree.Taxon));
            if (webTaxonTree.Children.IsNotEmpty())
            {
                foreach (WebTaxonTreeNode child in webTaxonTree.Children)
                {
                    taxonTree.AddChild(GetTaxonTree(child));
                }
            }
            return(taxonTree);
        }
コード例 #2
0
 /// <summary>
 /// Add a taxon tree node to the parents
 /// of this taxon tree node.
 /// </summary>
 /// <param name='taxonTreeNode'>Taxon tree node to add.</param>
 public void AddParent(TaxonTreeNode taxonTreeNode)
 {
     _parents.Add(taxonTreeNode);
 }
コード例 #3
0
 /// <summary>
 /// Add a taxon tree node to the children
 /// of this taxon tree node.
 /// </summary>
 /// <param name='taxonTreeNode'>Taxon tree node to add.</param>
 public void AddChild(TaxonTreeNode taxonTreeNode)
 {
     _children.Add(taxonTreeNode);
     taxonTreeNode.AddParent(this);
 }