private void SetReportParameters(PreparedMetricsReport metrics) { _NamespacesInCycles.Value = SqiParameterType.Number(metrics.NumberOfNamespacesInCycleHotspots.Count()); _ComplicatedMethods.Value = SqiParameterType.Number(metrics.Hotspots.OfCyclomaticComplexityOver(5).Count()); _AverageComponentDependency.Value = SqiParameterType.Percentage(metrics.Rated.AverageComponentDependency); _BigClasses.Value = SqiParameterType.Number(metrics.Hotspots.OfClassSizeOver(20).Count()); _BigMethods.Value = SqiParameterType.Number(metrics.Hotspots.OfMethodLengthOver(15).Count()); }
public SqiParameter Assign(string parameter, int value, Action <SqiParameters, int> valueAssignment) { valueAssignment(this, value); var sqiParameter = new SqiParameter(parameter) { Value = SqiParameterType.Number(value) }; sqiParameter.PropertyChanged += (_, __) => SqiParameterType.Number(sqiParameter.Value, v => { valueAssignment(this, v); SqiChanged(CalculateSqi()); }); return(sqiParameter); }
private void SetDetailParameters() { SqiParameterType.Percentage(Details.TestCoverage, v => _TestCoverage.Value = v); SqiParameterType.Number(Details.CompilerWarnings, v => _CompilerWarnings.Value = v); }