internal static JniEnvironment GetOrCreateInstance(JNIEnvHandle handle, out bool created) { bool wasCreated = false; JniEnvironment environment = _instances.GetOrAdd(handle, i => { wasCreated = true; return(CreateVirtualMachine(i)); }); created = wasCreated; return(environment); }
private static JniEnvironment CreateVirtualMachine(JNIEnvHandle handle) { return(new JniEnvironment(handle)); }
internal static JniEnvironment GetOrCreateInstance(JNIEnvHandle handle) { bool created; return(GetOrCreateInstance(handle, out created)); }
public JniEnvironment(JNIEnvHandle handle) { _handle = handle; _rawInterface = (jniNativeInterface)Marshal.PtrToStructure(Marshal.ReadIntPtr(handle.Handle), typeof(jniNativeInterface)); }