public bool TryCatchEcxeption(out LocalRef ex) { if (GetDelegate <ExceptionCheck>(functions.ExceptionCheckPtr)(envPtr)) { ex = new LocalRef(GetDelegate <ExceptionOccurred>(functions.ExceptionOccurredPtr)(envPtr)); return(true); } ex = null; return(false); }
public LocalRef[] GetArray(IntPtr arrayPtr) { var length = SafeJniCall(GetDelegate <GetArrayLength>(functions.GetArrayLengthPtr).Invoke, arrayPtr); var ret = new LocalRef[length]; for (var i = 0; i < length; i++) { ret[i] = new LocalRef( SafeJniCall(GetDelegate <GetObjectArrayElement>(functions.GetObjectArrayElementPtr).Invoke, arrayPtr, i)); } return(ret); }