예제 #1
0
 private static RuleExprAst <int> MaxTotalDebt(int debtLimit)
 {
     return
         (from amount in Dsl.GetAmount()
          from creditA in Dsl.GetValue("CreditA")
          from creditB in Dsl.GetValue("CreditB")
          let totalCredit = creditA + creditB
                            select totalCredit > debtLimit ? 0 : amount);
 }