Exemple #1
0
        public static List <Complexity> Factory(Dependency root, Dictionary <Dependency, Links> links)
        {
            var complexities = new Complexities(links);

            complexities.Visit(root);
            return(complexities.List.OrderByDescending(o => o.EPNNs.Value).ToList());
        }
Exemple #2
0
        public override void Visit(Dependency dependency)
        {
            base.Visit(dependency);
            if (dependency.Children.Count != 0)
            {
                var item = Complexities.Complexity(dependency, this.links);
                this.List.Add(item);
                this.summed[dependency] = item;
                foreach (var child in dependency.Children)
                {
                    var complexity = this.summed[child];
                    if (complexity == null)
                    {
                        continue;
                    }

                    item.Ns.AddChild(complexity.Ns);
                    item.EPNs.AddChild(complexity.EPNs);
                    item.EPNNs.AddChild(complexity.EPNNs);
                }
            }
            else
            {
                this.summed[dependency] = new Complexity(0, 0, dependency);
            }
        }
Exemple #3
0
 private List <Complexity> TableRows()
 {
     return(Complexities.Factory(this.dependencies.Root, this.assembled.Linkings));
 }