Beispiel #1
0
 public override RuntimeObj SetValue(Expr e, RuntimeObj value)
 {
     Debug.Assert(_handler.PropertySetter != null);
     try
     {
         object v = Convert.ChangeType(value.ToNative(_eo._context), _handler.PropertyOrFieldType);
         _handler.PropertySetter(_eo._o, null, v);
     }
     catch (Exception ex)
     {
         return(new RuntimeError(e, ex.Message));
     }
     return(base.SetValue(e, value));
 }
Beispiel #2
0
 public override object ToNative(GlobalContext c) => _value.ToNative(c);