Search Results for

    Show / Hide Table of Contents

    Class RealmConfiguration

    Realm configuration specifying settings that affect the Realm's behavior.
    Its main role is generating a canonical path from whatever absolute, relative subdirectory, or just filename the user supplies.

    Inheritance
    object
    RealmConfigurationBase
    RealmConfiguration
    Inherited Members
    RealmConfigurationBase.DefaultRealmName
    RealmConfigurationBase.DatabasePath
    RealmConfigurationBase.FallbackPipePath
    RealmConfigurationBase.IsDynamic
    RealmConfigurationBase.ShouldCompactOnLaunch
    RealmConfigurationBase.Schema
    RealmConfigurationBase.GetPathToRealm(string)
    RealmConfigurationBase.SchemaVersion
    RealmConfigurationBase.MaxNumberOfActiveVersions
    Namespace: Realms
    Assembly: Realm.dll
    Syntax
    public class RealmConfiguration : RealmConfigurationBase

    Constructors

    | Edit this page View Source

    RealmConfiguration(string?)

    Initializes a new instance of the RealmConfiguration class.

    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

    | Edit this page View Source

    DefaultConfiguration

    Gets or sets the RealmConfigurationBase that is used when creating a new Realm without specifying a configuration.

    Declaration
    public static RealmConfigurationBase DefaultConfiguration { get; set; }
    Property Value
    Type Description
    RealmConfigurationBase

    The default configuration.

    | Edit this page 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.

    | Edit this page View Source

    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
    Type Description
    bool

    true if the Realm will be opened as readonly; false otherwise.

    | Edit this page View Source

    MigrationCallback

    Gets or sets the migration callback.

    Declaration
    public RealmConfiguration.MigrationCallbackDelegate? MigrationCallback { get; set; }
    Property Value
    Type Description
    RealmConfiguration.MigrationCallbackDelegate

    The RealmConfiguration.MigrationCallbackDelegate that will be invoked if the Realm needs to be migrated.

    | Edit this page View Source

    ShouldDeleteIfMigrationNeeded

    Gets or sets a value indicating whether the database will be deleted if the RealmSchema mismatches the one in the code. Use this when debugging and developing your app but never release it with this flag set to true.

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

    true to delete the database on schema mismatch; false otherwise.

    Methods

    | Edit this page View Source

    ConfigWithPath(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
    RealmConfiguration

    An object with a fully-specified, canonical path.

    • Edit this page
    • View Source
    In this article
    Back to top Copyright © 2020-2024 Realm
    Generated by DocFX