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;
        }
Ejemplo n.º 2
0
 public static extern byte get_object_privileges(SharedRealmHandle handle, ObjectHandle objectHandle, out NativeException ex);
Ejemplo n.º 3
0
 public static extern byte get_class_privileges(SharedRealmHandle handle,
                                                [MarshalAs(UnmanagedType.LPWStr)] string class_name, IntPtr class_name_len,
                                                out NativeException ex);
Ejemplo n.º 4
0
 public static extern byte get_realm_privileges(SharedRealmHandle handle, out NativeException ex);
Ejemplo n.º 5
0
 public static extern IntPtr get_session(AppHandle app, SharedRealmHandle realm, out NativeException ex);
Ejemplo n.º 6
0
 public static extern IntPtr subscribe_for_objects(SharedRealmHandle handle,
                                                   [MarshalAs(UnmanagedType.LPWStr)] string class_name, IntPtr class_name_len,
                                                   [MarshalAs(UnmanagedType.LPWStr)] string query, IntPtr query_len,
                                                   IntPtr task_completion_source, out NativeException ex);
Ejemplo n.º 7
0
 public static extern IntPtr get_realm_for_writing(SharedRealmHandle currentRealm, out NativeException ex);