Struct DynamicObjectApi
A class that exposes a set of API to access the data in a managed RealmObject dynamically.
Inherited Members
Namespace: Realms
Assembly: Realm.dll
Syntax
public readonly struct DynamicObjectApi
Methods
| Edit this page View SourceGetBacklinks(string)
Gets the value of a backlink property. This property must have been declared
explicitly and annotated with Backlink
Declaration
public IQueryable<IRealmObjectBase> GetBacklinks(string propertyName)
Parameters
Type | Name | Description |
---|---|---|
string | propertyName | The name of the backlink property. |
Returns
Type | Description |
---|---|
IQueryable<IRealm |
A queryable collection containing all objects pointing to this one via the property specified in Property. |
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<IRealm |
A queryable collection containing all objects of |
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 Object
Casting the values to Realm
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 Object
Casting the elements to Realm
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 Object
Casting the elements to Realm
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 Object
Casting to Realm
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. |
Realm |
value | The new value of the property. |