public static SharedRealmHandle OpenWithSync(Configuration configuration, Native.SyncConfiguration syncConfiguration, RealmSchema schema, byte[] encryptionKey) { DoInitialFileSystemConfiguration(); var marshaledSchema = new SharedRealmHandle.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 static AsyncOpenTaskHandle OpenWithSyncAsync(Configuration configuration, SyncConfiguration syncConfiguration, RealmSchema schema, byte[] encryptionKey, GCHandle tcsHandle) { DoInitialFileSystemConfiguration(); var marshaledSchema = new SharedRealmHandle.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(); var asyncTaskHandle = new AsyncOpenTaskHandle(asyncTaskPtr); return(asyncTaskHandle); }
public static SharedRealmHandle OpenWithSync(Realms.Native.Configuration configuration, Native.SyncConfiguration syncConfiguration, RealmSchema schema, byte[] encryptionKey) { DoInitialFileSystemConfiguration(); var marshaledSchema = new SharedRealmHandle.SchemaMarshaler(schema); NativeException nativeException; var result = NativeMethods.open_with_sync(configuration, syncConfiguration, marshaledSchema.Objects, marshaledSchema.Objects.Length, marshaledSchema.Properties, encryptionKey, out nativeException); nativeException.ThrowIfNecessary(); var handle = new SharedRealmHandle(); handle.SetHandle(result); return handle; }
public static SharedRealmHandle OpenWithSync(Realms.Native.Configuration configuration, Native.SyncConfiguration syncConfiguration, RealmSchema schema, byte[] encryptionKey) { var marshaledSchema = new SharedRealmHandle.SchemaMarshaler(schema); NativeException nativeException; var result = NativeMethods.open_with_sync(configuration, syncConfiguration, marshaledSchema.Objects, marshaledSchema.Objects.Length, marshaledSchema.Properties, encryptionKey, out nativeException); nativeException.ThrowIfNecessary(); var handle = new SharedRealmHandle(); handle.SetHandle(result); return(handle); }