public CheckParameter(CheckMethod method, CheckOperator op, object failedvalue, object warningvalue, string description) { this.Method = method; this.Operator = op; this.FailedValue = failedvalue; this.WarningValue = warningvalue; this.Description = description; }
private string getOperatorName(CheckOperator op) { switch (op) { case CheckOperator.GreaterThan: return("大于"); case CheckOperator.LessThan: return("小于"); case CheckOperator.Equal: return("等于"); case CheckOperator.NotEqual: return("不等于"); default: return("--"); } }
private bool compareValue(CheckOperator op, double value, double threshold) { switch (op) { case CheckOperator.GreaterThan: if (value > threshold) { return(true); } break; case CheckOperator.LessThan: if (value < threshold) { return(true); } break; case CheckOperator.Equal: if (value == threshold) { return(true); } break; case CheckOperator.NotEqual: if (value != threshold) { return(true); } break; default: throw new Exception("比较操作符未定义"); } return(false); }
public CheckExpression Or(Column thisColumn, CheckOperator checkOperator, Column thatColumn) { SqlDefinition = string.Concat(SqlDefinition.Trim(), " OR ", $"[{thisColumn.Name}] {checkOperator.GetStringValue()} [{thatColumn.Name}]"); return(this); }
public CheckExpression Or(Column column, CheckOperator checkOperator, object value) { SqlDefinition = string.Concat(SqlDefinition.Trim(), " OR ", $"[{column.Name}] {checkOperator.GetStringValue()} {value.ToString()}"); return(this); }
public CheckExpression(Column thisColumn, CheckOperator checkOperator, Column thatColumn) : this(thisColumn, checkOperator, $"[{thatColumn.Name}]") { }
public CheckExpression(Column column, CheckOperator checkOperator, object value) : this($"[{column.Name}] {checkOperator.GetStringValue()} {value.ToString()}") { }
public static bool IsMatch(CheckOperator checkOperator, string input) { return(checkOperator.CanCheck(CellOperationValue.Make(new TypedValue(null)), TestUtils.CreateCell(input))); }
public StackOperatorBlock(CheckOperator op) => this.op = op;
public static bool IsMatch(CheckOperator checkOperator, string input) { return checkOperator.CanCheck(CellOperationValue.Make(new TypedValue(null)), TestUtils.CreateCell(input)); }
public OperatorBlock(CheckOperator op, int index) { OP = op; Index = index; }