Esempio n. 1
0
        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);
        }
Esempio n. 2
0
 public IntPtr MarshalManagedToNative(object ManagedObj)
 {
     if (ManagedObj == null)
     {
         return(NULL);
     }
     if (this.kind == MarshalAsKind.kVirtualMachine)
     {
         NSJSVirtualMachine machine = ManagedObj as NSJSVirtualMachine;
         if (machine == null)
         {
             return(NULL);
         }
         return(machine.Isolate);
     }
     else if (this.kind == MarshalAsKind.kStateObject)
     {
         return(MarshalAs.ObjectToIUnknown(ManagedObj));
     }
     return(NULL);
 }
Esempio n. 3
0
 public virtual void SetData(int solt, object value)
 {
     this.SetData(solt, MarshalAs.ObjectToIUnknown(value));
 }