Class SyncConfiguration
A SyncConfiguration is used to setup a Realm that can be synchronized between devices using MongoDB Realm.
Inherited Members
Namespace: Realms.Sync
Assembly: Realm.dll
Syntax
public class SyncConfiguration : RealmConfigurationBase
Constructors
| Improve this Doc View SourceSyncConfiguration(Nullable<ObjectId>, User, String)
Initializes a new instance of the SyncConfiguration class.
Declaration
public SyncConfiguration(ObjectId? partition, User user, string optionalPath = null)
Parameters
Type | Name | Description |
---|---|---|
Nullable<MongoDB.Bson.ObjectId> | partition | The partition identifying the remote Realm that will be synchronized. |
User | user | A valid User. |
String | optionalPath | Path to the realm, must be a valid full path for the current platform, relative subdirectory, or just filename. |
SyncConfiguration(Nullable<Int64>, User, String)
Initializes a new instance of the SyncConfiguration class.
Declaration
public SyncConfiguration(long? partition, User user, string optionalPath = null)
Parameters
Type | Name | Description |
---|---|---|
Nullable<Int64> | partition | The partition identifying the remote Realm that will be synchronized. |
User | user | A valid User. |
String | optionalPath | Path to the realm, must be a valid full path for the current platform, relative subdirectory, or just filename. |
SyncConfiguration(String, User, String)
Initializes a new instance of the SyncConfiguration class.
Declaration
public SyncConfiguration(string partition, User user, string optionalPath = null)
Parameters
Type | Name | Description |
---|---|---|
String | partition | The partition identifying the remote Realm that will be synchronized. |
User | user | A valid User. |
String | optionalPath | Path to the realm, must be a valid full path for the current platform, relative subdirectory, or just filename. |
Properties
| Improve this Doc View SourceOnProgress
Gets or sets a callback that is invoked when download progress is made when using GetInstanceAsync(RealmConfigurationBase, CancellationToken). This will only be invoked for the initial download of the Realm and will not be invoked as futher download progress is made during the lifetime of the Realm. It is ignored when using GetInstance(RealmConfigurationBase).
Declaration
public Action<SyncProgress> OnProgress { get; set; }
Property Value
Type | Description |
---|---|
Action<SyncProgress> | A callback that will be periodically invoked as the Realm is downloaded. |
Partition
Gets the partition identifying the Realm this configuration is describing.
Declaration
public object Partition { get; }
Property Value
Type | Description |
---|---|
Object | The partition value for the Realm. |
User
Gets the User used to create this SyncConfiguration.
Declaration
public User User { get; }
Property Value
Type | Description |
---|---|
User |