andrena.Usus.net.Core.Metrics.CreateGraph.WithTypesOf C# (CSharp) Method

WithTypesOf() public static method

public static WithTypesOf ( andrena.Usus.net.Core.Reports.MetricsReport metrics ) : MutableGraph
metrics andrena.Usus.net.Core.Reports.MetricsReport
return MutableGraph
        public static MutableGraph<TypeMetricsReport> WithTypesOf(MetricsReport metrics)
        {
            return metrics.Types
                .ToDictionary(t => t, t => t.InterestingDirectDependencies.Select(d => metrics.TypeForName(d)))
                .ToGraph();
        }

Usage Example

 public static void Of(MetricsReport metrics)
 {
     metrics.SetInterestingDirectDependencies();
     metrics.GraphOfTypes = CreateGraph.WithTypesOf(metrics);
     metrics.SetCumulativeComponentDependency();
 }