Show / Hide Table of Contents

    Class NamedSubscription

    A managed Realm object representing a subscription. Subscriptions are used by Query-based Realms to define which data should be available on the device. It is the persisted version of a Subscription<T> created by calling Subscribe<T>(IQueryable<T>, String).

    Inheritance
    Object
    RealmObject
    NamedSubscription
    Implements
    INotifyPropertyChanged
    ISchemaSource
    IReflectableType
    Inherited Members
    RealmObject.PropertyChanged
    RealmObject.IsManaged
    RealmObject.IsValid
    RealmObject.Realm
    RealmObject.ObjectSchema
    RealmObject.BacklinksCount
    RealmObject.RaisePropertyChanged(String)
    RealmObject.OnPropertyChanged(String)
    RealmObject.OnManaged()
    Namespace: Realms.Sync
    Assembly: Realm.dll
    Syntax
    [MapTo("__ResultSets")]
    public class NamedSubscription : RealmObject, INotifyPropertyChanged, ISchemaSource, IThreadConfined, NotificationsHelper.INotifiable, IReflectableType

    Properties

    | Improve this Doc View Source

    CreatedAt

    Gets the point in time when the subscription was created.

    Declaration
    [MapTo("created_at")]
    public DateTimeOffset CreatedAt { get; }
    Property Value
    Type Description
    DateTimeOffset

    The creation date of the subscription.

    | Improve this Doc View Source

    Error

    Gets a value indicating what error (if any) has occurred while processing the subscription. If the State is not Error, this will be null.

    Declaration
    public Exception Error { get; }
    Property Value
    Type Description
    Exception

    An instance of Exception if an error has occurred; null otherwise.

    | Improve this Doc View Source

    ExpiresAt

    Gets the point in time when the subscription will expire and become eligible for removal.

    Declaration
    [MapTo("expires_at")]
    public DateTimeOffset? ExpiresAt { get; }
    Property Value
    Type Description
    Nullable<DateTimeOffset>

    The expiration date of the subscription.

    Remarks

    Realm will automatically remove expired subscriptions at opportunistic times. There are no guarantees as to when the subscription will be removed.

    | Improve this Doc View Source

    Name

    Gets the name of the subscription. If no name was provided in Name, then an automatic name will have been generated based on the query.

    Declaration
    [MapTo("name")]
    [Indexed]
    [Required]
    public string Name { get; }
    Property Value
    Type Description
    String

    The subscription name.

    | Improve this Doc View Source

    ObjectType

    Gets the type of the object that this subscription is applied to.

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

    The type of the object that the subscription matches.

    | Improve this Doc View Source

    Query

    Gets the string representation of the query used to create the subscription.

    Declaration
    [MapTo("query")]
    [Required]
    public string Query { get; }
    Property Value
    Type Description
    String

    The subscription query.

    | Improve this Doc View Source

    State

    Gets a value indicating the state of this subscription.

    Declaration
    public SubscriptionState State { get; }
    Property Value
    Type Description
    SubscriptionState

    The state of the subscription.

    | Improve this Doc View Source

    TimeToLive

    Gets the time to live of the subscription.

    Declaration
    public TimeSpan? TimeToLive { get; }
    Property Value
    Type Description
    Nullable<TimeSpan>

    The subscription's time to live.

    | Improve this Doc View Source

    UpdatedAt

    Gets the point in time when the subscription was updated.

    Declaration
    [MapTo("updated_at")]
    public DateTimeOffset UpdatedAt { get; }
    Property Value
    Type Description
    DateTimeOffset

    The last updated date of the subscription.

    Remarks

    In this context, "updated" means that the subscription was resubscribed to or some property was updated by calling . The field is NOT updated whenever the results of the query changes.

    Implements

    System.ComponentModel.INotifyPropertyChanged
    ISchemaSource
    System.Reflection.IReflectableType
    • Improve this Doc
    • View Source
    Back to top Copyright © 2019 Realm
    Generated by DocFX