public CoverageThreshold(CoverageViewElementType type, CoverageMetric stat, float statValue, string name) : this(type, stat, statValue) { if ((name != null) && (name.Trim() == "*")) { name = string.Empty; } this.Pattern = name; }
public CoverageThreshold(CoverageViewElementType type, CoverageMetric stat, float statValue) { if (statValue < 0f) { throw new ArgumentOutOfRangeException("statValue", statValue, "Parameter 'statValue' must be greater than or equal to 0.0 Was: " + statValue.ToString()); } if ((stat != CoverageMetric.CyclomaticComplexity) && (statValue > 100f)) { throw new ArgumentOutOfRangeException("statValue", statValue, "Parameter 'statValue' must be less than or equal to 100.0 Was: " + statValue.ToString()); } if (((type == CoverageViewElementType.Unknown) || (type == CoverageViewElementType.InstrumentedPoint)) || ((type == CoverageViewElementType.Method) || (type == CoverageViewElementType.Property))) { throw new ArgumentOutOfRangeException("type", type, "Parameter 'type' had an invalid value: " + type.ToString()); } this.Value = statValue; this.ElementType = type; this.CoverageType = stat; }
public CoverageTypeMappingAttribute(CoverageMetric coverageType) { this.CoverageType = coverageType; }