internal List <TaxonomyNode> LoadChildren(TaxonomyNode taxon)
        {
            if (taxon.IsDetached)
            {
                throw new Exception(String.Format("Taxon '{0}' is detached", taxon.Name));
            }
            var children = new List <TaxonomyNode>();
            var entities = relationSrv.GetRelated <TaxonEntity>(taxon.entity, RelationDirection.Forward, rootNode).ToList();

            foreach (var entity in entities)
            {
                var newNode = new TaxonomyNode(this, entity)
                {
                    parent = taxon
                };
                children.Add(newNode);
            }
            return(children);
        }
Beispiel #2
0
 public IList <MetricsEntity> GetFor(IClassifiable entity)
 {
     return(relationService.GetRelated <MetricsEntity>(entity, RelationDirection.Forward, relationNode));
 }