Search Results for

    Show / Hide Table of Contents

    Class RealmConfiguration

    Realm configuration specifying settings that affect the Realm's behavior.

    Inheritance
    Object
    RealmConfigurationBase
    RealmConfiguration
    Inherited Members
    RealmConfigurationBase.DefaultRealmName
    RealmConfigurationBase.DatabasePath
    RealmConfigurationBase.FallbackPipePath
    RealmConfigurationBase.IsDynamic
    RealmConfigurationBase.ObjectClasses
    RealmConfigurationBase.Schema
    RealmConfigurationBase.GetPathToRealm(String)
    RealmConfigurationBase.SchemaVersion
    RealmConfigurationBase.EncryptionKey
    RealmConfigurationBase.MaxNumberOfActiveVersions
    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 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

    | Improve this Doc 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.

    | Improve this Doc 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
    Boolean

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

    | Improve this Doc 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.

    | Improve this Doc View Source

    ShouldCompactOnLaunch

    Gets or sets the compact on launch callback.

    Declaration
    public RealmConfiguration.ShouldCompactDelegate ShouldCompactOnLaunch { get; set; }
    Property Value
    Type Description
    RealmConfiguration.ShouldCompactDelegate

    The RealmConfiguration.ShouldCompactDelegate that will be invoked when opening a Realm for the first time to determine if it should be compacted before being returned to the user.

    | Improve this Doc 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
    Boolean

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

    Methods

    | Improve this Doc 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.

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