Example #1
0
File: SQI.cs Project: cessor/MTSS12
 private void SetupSqiParameters()
 {
     Parameters.Add(_TestCoverage = sqiParameters.Assign("Test Coverage", 0.0, (p, v) => p.TestCoverage = v));
     Parameters.Add(_NamespacesInCycles = sqiParameters.Assign("Namespaces in Cycles", 0, (p, v) => p.NamespaceCycles = v));
     Parameters.Add(_ComplicatedMethods = sqiParameters.Assign("Complicated Methods", 0, (p, v) => p.ComplicatedMethods = v));
     Parameters.Add(_AverageComponentDependency = sqiParameters.Assign("Average Component Dependency", 0.0, (p, v) => p.AverageComponentDependency = v));
     Parameters.Add(_BigClasses = sqiParameters.Assign("Big Classes", 0, (p, v) => p.BigClasses = v));
     Parameters.Add(_BigMethods = sqiParameters.Assign("Bis Methods", 0, (p, v) => p.BigMethods = v));
     Parameters.Add(_CompilerWarnings = sqiParameters.Assign("Compiler Warnings", 0, (p, v) => p.CompilerWarnings = v));
 }
Example #2
0
 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;
 }