Show / Hide Table of Contents

    Class RealmSyncExtensions

    A set of extension methods that provide Sync-related functionality on top of Realm classes.

    Inheritance
    Object
    RealmSyncExtensions
    Inherited Members
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Object.ReferenceEquals(Object, Object)
    Object.ToString()
    Namespace: Realms.Sync
    Assembly: Realm.Sync.dll
    Syntax
    public static class RealmSyncExtensions

    Methods

    | Improve this Doc View Source

    GetSession(Realm)

    Gets the Session for the realm file behind this 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
    System.ArgumentNullException

    Thrown if realm is null.

    System.ArgumentException

    Thrown if the realm was not created with a SyncConfiguration object.

    | Improve this Doc View Source

    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

    Query-based synchronization is a tech preview. Its APIs are subject to change.

    See Also
    NSPredicate Cheatsheet
    • Improve this Doc
    • View Source
    Back to top Copyright © 2017 Realm
    Generated by DocFX