상속: ScriptExpression
예제 #1
0
 object IScriptCustomType.EvaluateUnaryExpression(ScriptUnaryExpression expression)
 {
     throw new ScriptRuntimeException(expression.Span,
                                      $"Operator [{expression.Operator}] is not supported for an array");
 }
예제 #2
0
 object IScriptCustomType.EvaluateUnaryExpression(ScriptUnaryExpression expression)
 {
     throw new ScriptRuntimeException(expression.Span, $"Operator [{expression.Operator}] is not supported for date");
 }
예제 #3
0
 object IScriptCustomType.EvaluateUnaryExpression(ScriptUnaryExpression expression)
 {
     switch (expression.Operator)
     {
         case ScriptUnaryOperator.Negate:
             return (ScriptTimeSpan)value.Negate();
         case ScriptUnaryOperator.Not:
             return value == TimeSpan.Zero;
         default:
             throw new ScriptRuntimeException(expression.Span, $"Operator [{expression.Operator}] is not supported for timespan");
     }
 }