Search Results for

    Show / Hide Table of Contents

    Interface IRealmAccessor

    Represents an accessor that encapsulates the methods and properties necessary for interfacing with the associated Realm object.

    Namespace: Realms
    Assembly: Realm.dll
    Syntax
    public interface IRealmAccessor

    Properties

    | Improve this Doc View Source

    BacklinksCount

    Gets the number of objects referring to this one via either a to-one or to-many relationship.

    Declaration
    int BacklinksCount { get; }
    Property Value
    Type Description
    Int32

    The number of objects referring to this one.

    Remarks

    This property is not observable so the PropertyChanged event will not fire when its value changes.

    | Improve this Doc View Source

    DynamicApi

    Gets an object encompassing the dynamic API for this RealmObjectBase instance.

    Declaration
    DynamicObjectApi DynamicApi { get; }
    Property Value
    Type Description
    DynamicObjectApi

    A Realms.Dynamic instance that wraps this RealmObject.

    | Improve this Doc View Source

    IsFrozen

    Gets a value indicating whether this object is frozen. Frozen objects are immutable and will not update when writes are made to the Realm. Unlike live objects, frozen objects can be used across threads.

    Declaration
    bool IsFrozen { get; }
    Property Value
    Type Description
    Boolean

    true if the object is frozen and immutable; false otherwise.

    See Also
    Freeze<T>(T)
    | Improve this Doc View Source

    IsManaged

    Gets a value indicating whether the object has been associated with a Realm, either at creation or via Add<T>(T, Boolean).

    Declaration
    bool IsManaged { get; }
    Property Value
    Type Description
    Boolean

    true if object belongs to a Realm; false if standalone.

    | Improve this Doc View Source

    IsValid

    Gets a value indicating whether this object is managed and represents a row in the database. If a managed object has been removed from the Realm, it is no longer valid and accessing properties on it will throw an exception. Unmanaged objects are always considered valid.

    Declaration
    bool IsValid { get; }
    Property Value
    Type Description
    Boolean

    true if managed and part of the Realm or unmanaged; false if managed but deleted.

    | Improve this Doc View Source

    ObjectSchema

    Gets the ObjectSchema instance that describes how the Realm this object belongs to sees it.

    Declaration
    ObjectSchema ObjectSchema { get; }
    Property Value
    Type Description
    ObjectSchema

    A collection of properties describing the underlying schema of this object.

    | Improve this Doc View Source

    Realm

    Gets the Realm instance this object belongs to, or null if it is unmanaged.

    Declaration
    Realm Realm { get; }
    Property Value
    Type Description
    Realm

    The Realm instance this object belongs to.

    Methods

    | Improve this Doc View Source

    GetBacklinks<T>(String)

    Gets the value of a backlink property. This property must have been declared explicitly and annotated with BacklinkAttribute.

    Declaration
    IQueryable<T> GetBacklinks<T>(string propertyName)
        where T : IRealmObjectBase
    Parameters
    Type Name Description
    String propertyName

    The name of the backlink property.

    Returns
    Type Description
    IQueryable<T>

    A queryable collection containing all objects pointing to this one via the property specified in Realms.BacklinkAttribute.Property.

    Type Parameters
    Name Description
    T

    The type of the object that is on the other end of the relationship.

    | Improve this Doc View Source

    GetDictionaryValue<TValue>(String)

    Gets the IDictionary<TKey,TValue> property of the object.

    Declaration
    IDictionary<string, TValue> GetDictionaryValue<TValue>(string propertyName)
    Parameters
    Type Name Description
    String propertyName

    The name of the property.

    Returns
    Type Description
    IDictionary<String, TValue>

    The value of the IDictionary<TKey,TValue> property.

    Type Parameters
    Name Description
    TValue

    The type of values in the dictionary.

    | Improve this Doc View Source

    GetListValue<T>(String)

    Gets the IList<T> property of the object.

    Declaration
    IList<T> GetListValue<T>(string propertyName)
    Parameters
    Type Name Description
    String propertyName

    The name of the property.

    Returns
    Type Description
    IList<T>

    The value of the IList<T> property.

    Type Parameters
    Name Description
    T

    The type of the elements in the collection.

    | Improve this Doc View Source

    GetParent()

    Gets the parent of the embedded object. It can be either another embedded object, a standalone realm object, or an asymmetric object.

    Declaration
    IRealmObjectBase GetParent()
    Returns
    Type Description
    IRealmObjectBase

    The parent of the embedded object.

    | Improve this Doc View Source

    GetSetValue<T>(String)

    Gets the ISet<T> property of the object.

    Declaration
    ISet<T> GetSetValue<T>(string propertyName)
    Parameters
    Type Name Description
    String propertyName

    The name of the property.

    Returns
    Type Description
    ISet<T>

    The value of the ISet<T> property.

    Type Parameters
    Name Description
    T

    The type of the elements in the collection.

    | Improve this Doc View Source

    GetTypeInfo(IRealmObjectBase)

    Gets the TypeInfo of the input object.

    Declaration
    TypeInfo GetTypeInfo(IRealmObjectBase obj)
    Parameters
    Type Name Description
    IRealmObjectBase obj

    The object to derive the TypeInfo from.

    Returns
    Type Description
    TypeInfo

    The TypeInfo of the input object.

    | Improve this Doc View Source

    GetValue(String)

    Gets the value of a property of the object.

    Declaration
    RealmValue GetValue(string propertyName)
    Parameters
    Type Name Description
    String propertyName

    The name of the property.

    Returns
    Type Description
    RealmValue

    The value of the property.

    Remarks

    This method cannot be used with collection properties. Please use one of the collection-specific methods for that.

    | Improve this Doc View Source

    SetValue(String, RealmValue)

    Set the value of a property of the object.

    Declaration
    void SetValue(string propertyName, RealmValue val)
    Parameters
    Type Name Description
    String propertyName

    The name of the property.

    RealmValue val

    The value to set.

    Remarks

    This method cannot be used with collection properties.

    | Improve this Doc View Source

    SetValueUnique(String, RealmValue)

    Set the value of the primary key of the object.

    Declaration
    void SetValueUnique(string propertyName, RealmValue val)
    Parameters
    Type Name Description
    String propertyName

    The name of the primary key property.

    RealmValue val

    The value to set.

    | Improve this Doc View Source

    SubscribeForNotifications(Action<String>)

    A method called internally to subscribe to the notifications for the associated object.

    Declaration
    void SubscribeForNotifications(Action<string> notifyPropertyChangedDelegate)
    Parameters
    Type Name Description
    Action<String> notifyPropertyChangedDelegate

    The delegate invoked when a notification is raised.

    | Improve this Doc View Source

    UnsubscribeFromNotifications()

    A method called internally to unsubscribe to the notifications for the associated object.

    Declaration
    void UnsubscribeFromNotifications()
    • Improve this Doc
    • View Source
    In This Article
    Back to top Copyright © 2020 Realm
    Generated by DocFX