コード例 #1
0
 private ClrFunctionInstance WrapDelegate(FakeEventDelegate _delegate)
 {
     return(Engine.AsJsFunction(new Func <JsValue, JsValue[], JsValue>((thisObject, args) => {
         _delegate(this, ((args[0].IsNull() || args[0].IsUndefined()) ? null : SDKTestDefault.NativeInstanceForObject(args[0].AsObject())));
         return JsValue.Undefined;
     })));
 }
コード例 #2
0
 private Action <dynamic> WrapDelegate(FakeEventDelegate _delegate)
 {
     return(new Action <dynamic>((item) => {
         _delegate(this, (Engine.IsNullOrUndefined(item) ? null : SDKTestDefault.NativeInstanceForObject(item)));
     }));
 }