public static IntPtr Open(Native.Configuration configuration, RealmSchema schema, byte[] encryptionKey) { var marshaledSchema = new SchemaMarshaler(schema); var result = NativeMethods.open(configuration, marshaledSchema.Objects, marshaledSchema.Objects.Length, marshaledSchema.Properties, encryptionKey, out NativeException nativeException); nativeException.ThrowIfNecessary(); return(result); }
public static AsyncOpenTaskHandle OpenWithSyncAsync(Configuration configuration, Sync.Native.SyncConfiguration syncConfiguration, RealmSchema schema, byte[] encryptionKey, GCHandle tcsHandle) { var marshaledSchema = new SchemaMarshaler(schema); var asyncTaskPtr = NativeMethods.open_with_sync_async(configuration, syncConfiguration, marshaledSchema.Objects, marshaledSchema.Objects.Length, marshaledSchema.Properties, encryptionKey, GCHandle.ToIntPtr(tcsHandle), out var nativeException); nativeException.ThrowIfNecessary(); return(new AsyncOpenTaskHandle(asyncTaskPtr)); }
public static SharedRealmHandle OpenWithSync(Configuration configuration, Sync.Native.SyncConfiguration syncConfiguration, RealmSchema schema, byte[] encryptionKey) { var marshaledSchema = new SchemaMarshaler(schema); var result = NativeMethods.open_with_sync(configuration, syncConfiguration, marshaledSchema.Objects, marshaledSchema.Objects.Length, marshaledSchema.Properties, encryptionKey, out var nativeException); nativeException.ThrowIfNecessary(); return(new SharedRealmHandle(result)); }
public IntPtr Open(Native.Configuration configuration, RealmSchema schema, byte[] encryptionKey) { var marshaledSchema = new SchemaMarshaler(schema); NativeException nativeException; var result = NativeMethods.open(configuration, marshaledSchema.Objects, marshaledSchema.Objects.Length, marshaledSchema.Properties, encryptionKey, out nativeException); nativeException.ThrowIfNecessary(); return result; }