public static IntPtr GetCookie(Delegate d) { if (d == null) { throw new ArgumentNullException("d"); } return(NSJSFunction.DelegateToFunctionPtr(d)); }
public static NSJSFunction New(NSJSVirtualMachine machine, NSJSFunctionCallback2 value) { IntPtr address = NULL; if (value != null) { address = NSJSFunction.DelegateToFunctionPtr(value); } return(InternalNew(machine, address)); }
private void InternalJoin(Delegate callback, object state) { if (callback == null) { throw new ArgumentNullException("callback"); } IntPtr ptr = MarshalAs.ObjectToIUnknown(state); nsjs_virtualmachine_join(this.Handle, NSJSFunction.DelegateToFunctionPtr(callback), ptr); }
private void InternalJoin(Delegate callback, IntPtr state) { if (callback == null) { throw new ArgumentNullException("callback"); } IntPtr machine = this.Handle; IntPtr function = NSJSFunction.DelegateToFunctionPtr(callback); nsjs_virtualmachine_join(machine, function, state); }
private ExtensionObjectTemplate(Delegate constructor) { IntPtr address = NULL; if (constructor != null) { address = NSJSFunction.DelegateToFunctionPtr(constructor); } this.Handle = nsjs_virtualmachine_extension_object_template_new(address); if (this.Handle == NULL) { throw new InvalidOperationException("Unable to create handle"); } }
private bool InternalSet(string key, Delegate value) { if (value == null) { throw new ArgumentNullException("value"); } return(this.Set(key, (name) => nsjs_localvalue_object_property_set_function(this.Isolate, this.Handle, name, NSJSFunction.DelegateToFunctionPtr(value)))); }
private bool InternalSet(string name, Delegate value, PropertyAttribute attributes) { return(Handling <bool>(name, (s) => nsjs_virtualmachine_extension_object_template_set_function(this.Handle, s, NSJSFunction.DelegateToFunctionPtr(value), attributes))); }