Search Results for

    Show / Hide Table of Contents

    Struct DynamicObjectApi

    A class that exposes a set of API to access the data in a managed RealmObject dynamically.

    Inherited Members
    ValueType.ToString()
    Namespace: Realms
    Assembly: Realm.dll
    Syntax
    public readonly struct DynamicObjectApi

    Methods

    | Edit this page View Source

    GetBacklinks(string)

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

    Declaration
    public IQueryable<IRealmObjectBase> GetBacklinks(string propertyName)
    Parameters
    Type Name Description
    string propertyName

    The name of the backlink property.

    Returns
    Type Description
    IQueryable<IRealmObjectBase>

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

    | Edit this page View Source

    GetBacklinksFromType(string, string)

    Gets a collection of all the objects that link to this object in the specified relationship.

    Declaration
    public IQueryable<IRealmObjectBase> GetBacklinksFromType(string fromObjectType, string fromPropertyName)
    Parameters
    Type Name Description
    string fromObjectType

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

    string fromPropertyName

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

    Returns
    Type Description
    IQueryable<IRealmObjectBase>

    A queryable collection containing all objects of fromObjectType that link to the current object via fromPropertyName.

    | Edit this page View Source

    GetDictionary<T>(string)

    Gets a IDictionary<TKey, TValue> property.

    Declaration
    public IDictionary<string, T> GetDictionary<T>(string propertyName)
    Parameters
    Type Name Description
    string propertyName

    The name of the dictionary property.

    Returns
    Type Description
    IDictionary<string, T>

    The value of the dictionary property.

    Type Parameters
    Name Description
    T

    The type of the values in the dictionary.

    Remarks

    To get a list of all properties available on the object along with their types, use ObjectSchema.
    Casting the values to RealmValue is always valid. When the collection contains objects, casting to IRealmObjectBase is always valid.

    | Edit this page View Source

    GetList<T>(string)

    Gets a IList<T> property.

    Declaration
    public IList<T> GetList<T>(string propertyName)
    Parameters
    Type Name Description
    string propertyName

    The name of the list property.

    Returns
    Type Description
    IList<T>

    The value of the list property.

    Type Parameters
    Name Description
    T

    The type of the elements in the list.

    Remarks

    To get a list of all properties available on the object along with their types, use ObjectSchema.
    Casting the elements to RealmValue is always valid. When the collection contains objects, casting to IRealmObjectBase is always valid.

    | Edit this page View Source

    GetSet<T>(string)

    Gets a ISet<T> property.

    Declaration
    public ISet<T> GetSet<T>(string propertyName)
    Parameters
    Type Name Description
    string propertyName

    The name of the Set property.

    Returns
    Type Description
    ISet<T>

    The value of the Set property.

    Type Parameters
    Name Description
    T

    The type of the elements in the Set.

    Remarks

    To get a list of all properties available on the object along with their types, use ObjectSchema.
    Casting the elements to RealmValue is always valid. When the collection contains objects, casting to IRealmObjectBase is always valid.

    | Edit this page View Source

    Get<T>(string)

    Gets the value of the property propertyName and casts it to T.

    Declaration
    public T Get<T>(string propertyName)
    Parameters
    Type Name Description
    string propertyName

    The name of the property.

    Returns
    Type Description
    T

    The value of the property.

    Type Parameters
    Name Description
    T

    The type of the property.

    Remarks

    To get a list of all properties available on the object along with their types, use ObjectSchema.
    Casting to RealmValue is always valid. When the property is of type object, casting to IRealmObjectBase is always valid.

    | Edit this page View Source

    Set(string, RealmValue)

    Sets the value of the property at propertyName to value.

    Declaration
    public void Set(string propertyName, RealmValue value)
    Parameters
    Type Name Description
    string propertyName

    The name of the property to set.

    RealmValue value

    The new value of the property.

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