Exemplo n.º 1
0
 /// <summary>
 /// Registers the allowed operations.
 /// </summary>
 protected override void RegisterOperators()
 {
     PlusOperator.Register(typeof(StringValue), typeof(Value), Add);
     PlusOperator.Register(typeof(Value), typeof(StringValue), Add);
 }
Exemplo n.º 2
0
 /// <summary>
 /// Helper for registering a plus operator.
 /// </summary>
 /// <param name="left">The type on the left side.</param>
 /// <param name="right">The type on the right side.</param>
 /// <param name="add">The function to execute.</param>
 protected static void RegisterPlus(Type left, Type right, Func <Value, Value, Value> add)
 {
     PlusOperator.Register(left, right, add);
 }