static private TransformWhenCondition ( |
||
gen | ||
comparisons | Expression | |
value | System.Linq.Expressions | |
Результат |
internal static MSA.Expression/*!*/ TransformWhenCondition(AstGenerator/*!*/ gen, Expression/*!*/[]/*!*/ comparisons, MSA.Expression value) {
MSA.Expression result;
if (comparisons.Length > 0) {
result = MakeTest(gen, comparisons[comparisons.Length - 1], value);
for (int i = comparisons.Length - 2; i >= 0; i--) {
result = Ast.OrElse(MakeTest(gen, comparisons[i], value), result);
}
} else {
result = Ast.Constant(false);
}
return result;
}