Search Results for

    Show / Hide Table of Contents

    Class ManagedAccessor

    Represents the base class for an accessor to be used with a managed object.

    Inheritance
    Object
    ManagedAccessor
    Implements
    IRealmAccessor
    Namespace: Realms
    Assembly: Realm.dll
    Syntax
    public abstract class ManagedAccessor : 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
    public 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
    public 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
    public 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
    public 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
    public 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
    public 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
    public Realm Realm { get; }
    Property Value
    Type Description
    Realm

    The Realm instance this object belongs to.

    Methods

    | Improve this Doc View Source

    Finalize()

    Finalizes an instance of the ManagedAccessor class.

    Declaration
    protected void Finalize()
    | Improve this Doc View Source

    GetBacklinks(String, String)

    Returns all the objects that link to this object in the specified relationship.

    Declaration
    [Obsolete("Use realmObject.DynamicApi.GetBacklinksFromType() instead.")]
    public IQueryable<dynamic> GetBacklinks(string objectType, string property)
    Parameters
    Type Name Description
    String objectType

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

    String property

    The property that is on the other end of the relationship.

    Returns
    Type Description
    IQueryable<Object>

    A queryable collection containing all objects of objectType that link to the current object via property.

    | 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
    public 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
    public 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
    public 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
    public 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
    public 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
    public 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
    public 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
    public 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
    public 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
    public 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

    ToString()

    Declaration
    public override string ToString()
    Returns
    Type Description
    String
    Overrides
    Object.ToString()
    | Improve this Doc View Source

    UnsubscribeFromNotifications()

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

    Declaration
    public void UnsubscribeFromNotifications()

    Implements

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