示例#1
0
 private static void ValidateConstantThreshold(
     string method,
     ExprOptionalConstantForge param)
 {
     if (param.OptionalConstant != null && param.OptionalConstant.AsInt64() < 0) {
         throw new ExprValidationException(
             "The " + method + " date-time method does not allow negative threshold value");
     }
 }
示例#2
0
        private static ExprOptionalConstantForge[] GetParameters(
            IList<ExprNode> expressions,
            TimeAbacus timeAbacus)
        {
            var parameters = new ExprOptionalConstantForge[expressions.Count - 1];
            for (var i = 1; i < expressions.Count; i++) {
                parameters[i - 1] = GetExprOrConstant(expressions[i], timeAbacus);
            }

            return parameters;
        }