Realm Xamarin
v0.80.0
Realm for Xamarin
|
Return type for a managed object property when you declare a to-many relationship with IList. More...
Inherits IList< T >, IRealmList, and IDynamicMetaObjectProvider.
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 () |
Related RealmObject enumerator 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 | |
bool | IsFixedSize => false |
Standard IList property. More... | |
bool | IsReadOnly => false |
Standard IList property. More... | |
bool | IsSynchronized => true |
Standard IList property. More... | |
const int | ITEM_NOT_FOUND = -1 |
Value returned by IndexOf if an item is not found. More... | |
Properties | |
int | Count [get] |
Gets the number 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 relationship 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. |
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. |
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 | Pre-allocated 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 | ( | ) |
Related RealmObject enumerator 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. |
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. |
ArgumentOutOfRangeException | 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. |
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. |
ArgumentOutOfRangeException | When the index is out of range for the related items. |
References RealmList< T >.GetEnumerator().
Referenced by RealmList< T >.Remove().
bool IsFixedSize => false |
Standard IList property.
false
at all times as the set of related objects may be changed.
bool IsReadOnly => false |
Standard IList property.
false
at all times.
bool IsSynchronized => true |
Standard IList property.
true
at all times.
const int ITEM_NOT_FOUND = -1 |
Value returned by IndexOf if an item is not found.
Referenced by RealmList< T >.Contains().
|
get |
Gets the number 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. |
ArgumentOutOfRangeException | When the index is out of range for the related items. |