Class RealmSyncExtensions
A set of extension methods that provide Sync-related functionality on top of Realm classes.
Inherited Members
Namespace: Realms.Sync
Assembly: Realm.Sync.dll
Syntax
public static class RealmSyncExtensions
Methods
| Improve this Doc View SourceGetSession(Realm)
Declaration
public static Session GetSession(this Realm realm)
Parameters
Type | Name | Description |
---|---|---|
Realm | realm | An instance of the Realm class created with a SyncConfiguration object. |
Returns
Type | Description |
---|---|
Session | The Session that is responsible for synchronizing with a Realm Object Server instance. |
Exceptions
Type | Condition |
---|---|
ArgumentNullException | Thrown if |
ArgumentException | Thrown if the |
SubscribeToObjectsAsync<T>(Realm, String)
If the Realm is a partially synchronized Realm, fetch and synchronize the objects of a given object type that match the given query (in string format).
Declaration
public static Task<IQueryable<T>> SubscribeToObjectsAsync<T>(this Realm realm, string query)
Parameters
Type | Name | Description |
---|---|---|
Realm | realm | An instance of the Realm class created with a SyncConfiguration object. |
String | query | A string-based query using the NSPredicate syntax to specify which objects should be returned. |
Returns
Type | Description |
---|---|
Task<IQueryable<T>> | An awaitable task that, upon completion, contains all objects matching the query. |
Type Parameters
Name | Description |
---|---|
T | The type of the objects making up the query. |
Remarks
Partial synchronization is a tech preview. Its APIs are subject to change.