Class RealmConfiguration
Realm configuration specifying settings that affect the Realm's behavior.
Inherited Members
Namespace: Realms
Assembly: Realm.dll
Syntax
public class RealmConfiguration : RealmConfigurationBase
Remarks
Its main role is generating a canonical path from whatever absolute, relative subdirectory, or just filename the user supplies.
Constructors
| Improve this Doc View SourceRealmConfiguration(String)
Initializes a new instance of the Realm
Declaration
public RealmConfiguration(string optionalPath = null)
Parameters
Type | Name | Description |
---|---|---|
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 SourceDefaultConfiguration
Gets or sets the Realm
Declaration
public static RealmConfigurationBase DefaultConfiguration { get; set; }
Property Value
Type | Description |
---|---|
Realm |
The default configuration. |
IsReadOnly
Gets or sets a value indicating whether a Realm is opened as readonly. This allows opening it from locked locations such as resources, bundled with an application.
Declaration
public bool IsReadOnly { get; set; }
Property Value
| Improve this Doc View SourceMigrationCallback
Gets or sets the migration callback.
Declaration
public RealmConfiguration.MigrationCallbackDelegate MigrationCallback { get; set; }
Property Value
Type | Description |
---|---|
Realm |
The Realm |
ShouldCompactOnLaunch
Gets or sets the compact on launch callback.
Declaration
public RealmConfiguration.ShouldCompactDelegate ShouldCompactOnLaunch { get; set; }
Property Value
Type | Description |
---|---|
Realm |
The Realm |
ShouldDeleteIfMigrationNeeded
Gets or sets a value indicating whether the database will be deleted if the Realmtrue
.
Declaration
public bool ShouldDeleteIfMigrationNeeded { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
|
Methods
| Improve this Doc View SourceConfigWithPath(String)
Clone method allowing you to override or customize the current path.
Declaration
public RealmConfiguration ConfigWithPath(string newConfigPath)
Parameters
Type | Name | Description |
---|---|---|
String | newConfigPath | Path to the realm, must be a valid full path for the current platform, relative subdirectory, or just filename. |
Returns
Type | Description |
---|---|
Realm |
An object with a fully-specified, canonical path. |