Realm Xamarin  v0.81.0
Realm for Xamarin
Static Public Member Functions | Static Public Attributes | Properties | List of all members
Realms.RealmConfigurationBase Class Referenceabstract

Base class for specifying configuration specifying settings that affect the Realm's behavior. More...

Inheritance diagram for Realms.RealmConfigurationBase:
Inheritance graph
[legend]

Static Public Member Functions

static string GetPathToRealm (string optionalPath=null)
 Utility to build a path in which a realm will be created so can consistently use filenames and relative paths. More...
 

Static Public Attributes

static string DefaultRealmName => "default.realm"
 Gets the filename to be combined with the platform-specific document directory. More...
 

Properties

string DatabasePath [get, protected set]
 Gets or sets the full path of the realms opened with this configuration, may be overriden by passing in a separate name. More...
 
byte [] EncryptionKey [get, set]
 Gets or sets the key, used to encrypt the entire Realm. Once set, must be specified each time file is used. More...
 
Type [] ObjectClasses [get, set]
 Gets or sets the list of classes persisted in a Realm opened with this configuration. More...
 
ulong SchemaVersion [get, set]
 Gets or sets a number, indicating the version of the schema. Can be used to arbitrarily distinguish between schemas even if they have the same objects and properties. More...
 

Detailed Description

Base class for specifying configuration specifying settings that affect the Realm's behavior.

Member Function Documentation

§ GetPathToRealm()

static string Realms.RealmConfigurationBase.GetPathToRealm ( string  optionalPath = null)
static

Utility to build a path in which a realm will be created so can consistently use filenames and relative paths.

Parameters
optionalPathPath to the realm, must be a valid full path for the current platform, relative subdirectory, or just filename.
Returns
A full path including name of Realm file.

References Realms.RealmConfigurationBase.DefaultRealmName.

Member Data Documentation

§ DefaultRealmName

string Realms.RealmConfigurationBase.DefaultRealmName => "default.realm"
static

Gets the filename to be combined with the platform-specific document directory.

A string representing a filename only, no path.

Referenced by Realms.RealmConfiguration.ConfigWithPath(), and Realms.RealmConfigurationBase.GetPathToRealm().

Property Documentation

§ DatabasePath

string Realms.RealmConfigurationBase.DatabasePath
getprotected set

Gets or sets the full path of the realms opened with this configuration, may be overriden by passing in a separate name.

Referenced by Realms.RealmConfiguration.ConfigWithPath(), and Realms.Realm.DeleteRealm().

§ EncryptionKey

byte [] Realms.RealmConfigurationBase.EncryptionKey
getset

Gets or sets the key, used to encrypt the entire Realm. Once set, must be specified each time file is used.

Full 64byte (512bit) key for AES-256 encryption.

Referenced by Realms.RealmConfiguration.ConfigWithPath().

§ ObjectClasses

Type [] Realms.RealmConfigurationBase.ObjectClasses
getset

Gets or sets the list of classes persisted in a Realm opened with this configuration.

Specify classes by type. Searched linearly so order in decreasing frequency of creating objects.

For example: config.ObjectClasses = new Type[] { typeof(CommonClass), typeof(RareClass) };.

Typically left null so by default all RealmObjects will be able to be stored in all realms.

Referenced by Realms.Realm.GetInstance().

§ SchemaVersion

ulong Realms.RealmConfigurationBase.SchemaVersion
getset

Gets or sets a number, indicating the version of the schema. Can be used to arbitrarily distinguish between schemas even if they have the same objects and properties.

0-based value initially set to zero so all user-set values will be greater.

Referenced by Realms.RealmConfiguration.ConfigWithPath().