Class SubscriptionOptions
A class providing various options to Add<T>(IQueryable<T>, SubscriptionOptions?). All the properties in this class are optional.
Namespace: Realms.Sync
Assembly: Realm.dll
Syntax
public class SubscriptionOptions
Properties
| Edit this page View SourceName
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. |
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 |
---|---|
bool |
|
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.