Show / Hide Table of Contents

    Class RealmConfigurationBase

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

    Inheritance
    Object
    RealmConfigurationBase
    InMemoryConfiguration
    RealmConfiguration
    SyncConfigurationBase
    Namespace: Realms
    Assembly: Realm.dll
    Syntax
    public abstract class RealmConfigurationBase
    Remarks

    Its main role is generating a canonical path from whatever absolute, relative subdirectory, or just filename the user supplies.

    Properties

    | Improve this Doc View Source

    DatabasePath

    Gets or sets the full path of the Realms opened with this Configuration. May be overridden by passing in a separate name.

    Declaration
    public string DatabasePath { get; protected set; }
    Property Value
    Type Description
    String

    The absolute path to the Realm.

    | Improve this Doc View Source

    DefaultRealmName

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

    Declaration
    public static string DefaultRealmName { get; }
    Property Value
    Type Description
    String

    A string representing a filename only, no path.

    | Improve this Doc View Source

    EncryptionKey

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

    Declaration
    public byte[] EncryptionKey { get; set; }
    Property Value
    Type Description
    Byte[]

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

    | Improve this Doc View Source

    IsDynamic

    Gets or sets a value indicating whether the Realm will be open in dynamic mode. If opened in dynamic mode, the schema will be read from the file on disk.

    Declaration
    public bool IsDynamic { get; set; }
    Property Value
    Type Description
    Boolean

    true if the Realm will be opened in dynamic mode; false otherwise.

    | Improve this Doc View Source

    MaxNumberOfActiveVersions

    Gets or sets the maximum number of active versions allowed before an exception is thrown.

    Declaration
    public ulong MaxNumberOfActiveVersions { get; set; }
    Property Value
    Type Description
    UInt64
    See Also
    Freeze()
    | Improve this Doc View Source

    ObjectClasses

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

    Declaration
    public Type[] ObjectClasses { get; set; }
    Property Value
    Type Description
    Type[]

    The classes that can be persisted in the Realm.

    Remarks

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

    Examples
    config.ObjectClasses = new Type[]
    {
        typeof(CommonClass),
        typeof(RareClass)
    };
    | Improve this Doc View Source

    SchemaVersion

    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.

    Declaration
    public ulong SchemaVersion { get; set; }
    Property Value
    Type Description
    UInt64

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

    Methods

    | Improve this Doc View Source

    GetPathToRealm(String)

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

    Declaration
    public static string GetPathToRealm(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.

    Returns
    Type Description
    String

    A full path including name of Realm file.

    • Improve this Doc
    • View Source
    Back to top Copyright © 2020 Realm
    Generated by DocFX