Realm Xamarin
v0.77.1
Realm for Xamarin
|
Return type for a managed object property when you declare a to-many relationships with IList. More...
Inherits IList< T >, IRealmList, IDynamicMetaObjectProvider, and ICopyValuesFrom.
Public Member Functions | |
void | Add (T item) |
Makes a relationship to an item, appending it at the end of the sorted relationship. More... | |
void | Clear () |
Breaks the relationship to all related items, without deleting the items. More... | |
bool | Contains (T item) |
Tests if an item exists in the related set. More... | |
void | CopyTo (T[] array, int arrayIndex) |
Copies all the elements to a portion of an array. More... | |
Enumerator | GetEnumerator () |
Factory for an iterator to be called explicitly or used in a foreach loop. More... | |
int | IndexOf (T item) |
Finds an ordinal index for an item in a relationship. More... | |
void | Insert (int index, T item) |
Makes a relationship to an item, inserting at a specified location ahead of whatever else was in that location. More... | |
bool | Remove (T item) |
Breaks the relationship to the specified item, without deleting the item. More... | |
void | RemoveAt (int index) |
Breaks the relationship to the item at the ordinal index, without deleting the item. More... | |
Public Attributes | |
const int | ITEM_NOT_FOUND = -1 |
Value returned by IndexOf if an item is not found. More... | |
Properties | |
int | Count [get] |
Returns the count of related items. More... | |
T | this[int index] [get, set] |
Returns the item at the ordinal index. More... | |
Return type for a managed object property when you declare a to-many relationships with IList.
Relationships are ordered and preserve their order, hence the ability to use ordinal indexes in calls such as Insert and RemoveAt.
Although originally used in declarations, whilst that still compiles, it is not recommended as the IList approach both supports standalone objects and is implemented with a faster binding.
T | Type of the RealmObject which is the target of the relationship. |
T | : | RealmObject |
void Add | ( | T | item | ) |
Makes a relationship to an item, appending it at the end of the sorted relationship.
item | RealmObject being added to the relationship. |
T | Type of the RealmObject which is the target of the relationship. |
Referenced by RealmList< T >.RemoveAt().
void Clear | ( | ) |
Breaks the relationship to all related items, without deleting the items.
bool Contains | ( | T | item | ) |
Tests if an item exists in the related set.
item | Object to be searched for in the related items. |
T | Type of the RealmObject which is the target of the relationship. |
References RealmList< T >.IndexOf(), and RealmList< T >.ITEM_NOT_FOUND.
void CopyTo | ( | T[] | array, |
int | arrayIndex | ||
) |
Copies all the elements to a portion of an array.
array | Preallocated destination into which we copy. |
arrayIndex | Ordinal zero-based starting index of the destination of the related items being copied. |
ArgumentNullException | Thrown if array is null. |
ArgumentOutOfRangeException | Thrown if arrayIndex is less than 0. |
ArgumentException | Thrown if there is not enough room in array from arrayIndex onward. |
References RealmList< T >.Count.
Enumerator GetEnumerator | ( | ) |
Factory for an iterator to be called explicitly or used in a foreach loop.
Referenced by RealmList< T >.RemoveAt().
int IndexOf | ( | T | item | ) |
Finds an ordinal index for an item in a relationship.
item | RealmObject being removed from the relationship. |
T | Type of the RealmObject which is the target of the relationship. |
Referenced by RealmList< T >.Contains(), and RealmList< T >.Remove().
void Insert | ( | int | index, |
T | item | ||
) |
Makes a relationship to an item, inserting at a specified location ahead of whatever else was in that location.
index | Ordinal zero-based index at which to insert the related items. |
item | RealmObject being inserted into the relationship. |
T | Type of the RealmObject which is the target of the relationship. |
IndexOutOfRangeException | When the index is out of range for the related items. |
bool Remove | ( | T | item | ) |
Breaks the relationship to the specified item, without deleting the item.
item | RealmObject being removed from the relationship. |
T | Type of the RealmObject which is the target of the relationship. |
References RealmList< T >.IndexOf(), and RealmList< T >.RemoveAt().
void RemoveAt | ( | int | index | ) |
Breaks the relationship to the item at the ordinal index, without deleting the item.
index | Ordinal zero-based index of the related item. |
IndexOutOfRangeException | When the index is out of range for the related items. |
References RealmList< T >.Add(), and RealmList< T >.GetEnumerator().
Referenced by RealmList< T >.Remove().
const int ITEM_NOT_FOUND = -1 |
Value returned by IndexOf if an item is not found.
Referenced by RealmList< T >.Contains().
|
get |
Returns the count of related items.
Referenced by RealmList< T >.CopyTo().
|
getset |
Returns the item at the ordinal index.
index | Ordinal zero-based index of the related items. |
T | Type of the RealmObject which is the target of the relationship. |
IndexOutOfRangeException | When the index is out of range for the related items. |