public static CseObject Parse(CseObject leftOp, CseObject rightOp, CondType type) {
CseObject obj = new CseObject(null) { IsLiteral = leftOp.IsLiteral && rightOp.IsLiteral };
try {
switch (type) {
case CondType.EQ:
obj.Value = leftOp.Value == rightOp.Value;
break;
case CondType.NEQ:
obj.Value = leftOp.Value != rightOp.Value;
break;
case CondType.GT:
obj.Value = leftOp.Value > rightOp.Value;
break;
case CondType.GTE:
obj.Value = leftOp.Value >= rightOp.Value;
break;
case CondType.LT:
obj.Value = leftOp.Value < rightOp.Value;
break;
case CondType.LTE:
obj.Value = leftOp.Value <= rightOp.Value;
break;
default:
throw new System.NotImplementedException("Not implemented.");
}
}
catch {
// TODO: Fill this out!
}
return obj;
}