@@ -30,7 +30,7 @@ static void Main(string[] args)
30
30
31
31
var metricConfiguration = DashedParameterSerializer . Deserialize < MetricConfiguration > ( args ) ;
32
32
33
- var runCodeMetrics = RunCodeMetrics ( metricConfiguration . Solution , metricConfiguration . IgnoredProjects ) ;
33
+ var runCodeMetrics = RunCodeMetrics ( metricConfiguration ) ;
34
34
runCodeMetrics . Wait ( ) ;
35
35
Console . WriteLine ( "All projects measure, creating report" ) ;
36
36
var ignoredNamespaces = metricConfiguration . IgnoredNamespaces ?? Enumerable . Empty < string > ( ) ;
@@ -129,19 +129,23 @@ private static List<MetodoRuim> GetMetodosRuins(List<MetodoComTipo> metodos, int
129
129
return metodosRuins ;
130
130
}
131
131
132
- private static async Task < IEnumerable < INamespaceMetric > > RunCodeMetrics ( string solutionPath , string [ ] ignoredProjects )
132
+ private static async Task < IEnumerable < INamespaceMetric > > RunCodeMetrics ( MetricConfiguration configuration )
133
133
{
134
134
Console . WriteLine ( "Loading Solution" ) ;
135
135
var solutionProvider = new SolutionProvider ( ) ;
136
- var solution = await solutionProvider . Get ( solutionPath ) . ConfigureAwait ( false ) ;
136
+ var solution = await solutionProvider . Get ( configuration . Solution ) . ConfigureAwait ( false ) ;
137
137
Console . WriteLine ( "Solution loaded" ) ;
138
138
139
- var projects = solution . Projects . Where ( p => ! ignoredProjects . Contains ( p . Name ) ) . ToList ( ) ;
139
+ var projects = solution . Projects . Where ( p => ! configuration . IgnoredProjects . Contains ( p . Name ) ) . ToList ( ) ;
140
140
141
141
Console . WriteLine ( "Loading metrics, wait it may take a while." ) ;
142
142
143
143
var metrics = new List < IEnumerable < INamespaceMetric > > ( ) ;
144
- var metricsCalculator = new CodeMetricsCalculator ( ) ;
144
+ var metricsCalculator = new CodeMetricsCalculator ( new CalculationConfiguration
145
+ {
146
+ NamespacesIgnored = configuration . IgnoredNamespaces ,
147
+ TypesIgnored = configuration . IgnoredTypes
148
+ } ) ;
145
149
foreach ( var project in projects )
146
150
{
147
151
var calculate = await metricsCalculator . Calculate ( project , solution ) ;
0 commit comments