Class Subscription
A class representing a single query subscription. The server will continuously evaluate the Query that the app subscribed to and will send data that matches it as well as remove data that no longer does.
Namespace: Realms.Sync
Assembly: Realm.dll
Syntax
public class Subscription
Properties
| Edit this page View SourceCreatedAt
Gets a value indicating when this subscription was created.
Declaration
public DateTimeOffset CreatedAt { get; }
Property Value
Type | Description |
---|---|
DateTimeOffset | The creation date/time of the subscription. |
Name
Gets the name of the subscription if one was provided at creation time.
If no name was provided, then this will return null
.
Declaration
public string? Name { get; }
Property Value
Type | Description |
---|---|
string | The subscription's name. |
ObjectType
Gets the type of objects this subscription refers to.
Declaration
public string ObjectType { get; }
Property Value
Type | Description |
---|---|
string | The object type for the subscription. |
Remarks
If your types are remapped using MapToAttribute, the value returned will be the mapped-to value - i.e. the one that Realm uses internally rather than the name of the C# class.
Query
Gets the query that describes the subscription. Objects matched by the query will be sent to the device by the server.
Declaration
public string Query { get; }
Property Value
Type | Description |
---|---|
string | The subscription query. |
UpdatedAt
Gets a value indicating when this subscription was last updated.
Declaration
public DateTimeOffset UpdatedAt { get; }
Property Value
Type | Description |
---|---|
DateTimeOffset | The date/time of the last update to the subscription. |