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; }
private static IntPtr CreateVMHook(Delegate theDelegate, string name) { DelegatePin pin = new DelegatePin(theDelegate, name); AddDelegatePin(pin); return pin.ToFunctionPointer(); }