Search Results for

    Show / Hide Table of Contents

    Class SubscriptionOptions

    A class providing various options to Add<T>(IQueryable<T>, SubscriptionOptions). All the properties in this class are optional.

    Inheritance
    Object
    SubscriptionOptions
    Namespace: Realms.Sync
    Assembly: Realm.dll
    Syntax
    public class SubscriptionOptions

    Properties

    | Improve this Doc View Source

    Name

    Gets or sets name of the subscription that is being added. This will be reflected in Name. If not specified, an automatic name will be generated from the query.

    Declaration
    public string Name { get; set; }
    Property Value
    Type Description
    String

    The subscription's name.

    | Improve this Doc View Source

    UpdateExisting

    Gets or sets a value indicating whether the operation should update an existing subscription with the same name. The default is true.

    Declaration
    public bool UpdateExisting { get; set; }
    Property Value
    Type Description
    Boolean

    true if Add<T>(IQueryable<T>, SubscriptionOptions) should have UPSERT semantics, false if you need it to be strictly an INSERT.

    Remarks

    Adding a subscription with the same name and query string is a no-op, regardless of the value of UpdateExisting. This means that if Name is not specified, Add<T>(IQueryable<T>, SubscriptionOptions) will always succeed since the name is derived from the query string. If Name is set to a non-null value and UpdateExisting is set to false, Add<T>(IQueryable<T>, SubscriptionOptions) may throw an exception if the subscription set contains a subscription with the same name, but a different query string.

    • Improve this Doc
    • View Source
    In This Article
    Back to top Copyright © 2020 Realm
    Generated by DocFX