示例#1
0
 internal JniNativeMethod[] ToJniNativeMethodArray(out DelegatePin[] pins)
 {
     JniNativeMethod[] outArray = new JniNativeMethod[mEntries.Count];
     pins = new DelegatePin[0];
     List<DelegatePin> tempPins = new List<DelegatePin>();
     for (int i = 0; i < mEntries.Count; i++)
     {
         JniNativeMethodEntry entry = (JniNativeMethodEntry)mEntries[i];
         DelegatePin pin = new DelegatePin(entry.functionDelegate, entry.name+":"+entry.signature);
         outArray[i] = new JniNativeMethod(entry.name, entry.signature, pin.ToFunctionPointer());
         tempPins.Add(pin);
     }
     pins = tempPins.ToArray();
     return outArray;
 }
示例#2
0
文件: JavaVM.cs 项目: tottty/csjni
 private static IntPtr CreateVMHook(Delegate theDelegate, string name)
 {
     DelegatePin pin = new DelegatePin(theDelegate, name);
     AddDelegatePin(pin);
     return pin.ToFunctionPointer();
 }