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 struct DynamicObjectApi

    Methods

    | Improve this Doc 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 RealmObjectBase is always valid.

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

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

    | Improve this Doc 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 RealmObjectBase is always valid.

    | Improve this Doc 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 RealmObjectBase is always valid.

    | Improve this Doc 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 RealmObjectBase is always valid.

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

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