Class ListDictionary<TKey, TValue>.ReadOnlyValueList
Represents a synchronized read-only list of values associated with a key in a ListDictionary<TKey, TValue>.
Implements
Inherited Members
Namespace: Singulink.Collections
Assembly: Singulink.Collections.dll
Syntax
public class ListDictionary<TKey, TValue>.ReadOnlyValueList : IList<TValue>, ICollection<TValue>, IReadOnlyList<TValue>, IReadOnlyCollection<TValue>, IEnumerable<TValue>, IEnumerable, IEquatable<ListDictionary<TKey, TValue>.ReadOnlyValueList>
Properties
Name | Description |
---|---|
Count | Gets the number of items in this value list. If the count is zero, this value list is detached from Dictionary, i.e. calling ContainsKey(TKey) on the dictionary and passing in Key as a parameter will return false. When items are added to the value list it is attached to the dictionary. |
Dictionary | Gets the dictionary this value list is associate with. |
this[int] | Gets the element at the specified index. |
Key | Gets the key this value list is associated with. |
Methods
Name | Description |
---|---|
AsTransientReadOnly() | Returns a fast read-only view into the underlying list that is only guaranteed to be valid until the values associated with the Key in Dictionary are modified. |
Contains(TValue) | a Determines whether an element is in the list. |
CopyTo(int, TValue[], int, int) | Copies a range of elements from the list to an array starting at the specified array index. |
CopyTo(TValue[]) | Copies the list to an array. |
CopyTo(TValue[], int) | Copies the list to an array starting at the specified array index. |
Equals(ReadOnlyValueList?) | Determines whether this value list is equal to another value list. Value lists are considered equal if they point to the same Dictionary with the same Key. |
Equals(object?) | Determines whether this value list is equal to another object. Value lists are considered equal if they point to the same Dictionary and Key. |
Exists(Predicate<TValue>) | Determines whether the list contains an element that matches the condition specified by the specified predicate. |
Find(Predicate<TValue>) | Searches the list for an element that matches the conditions in the specified predicate and returns the first matching item. |
FindAll(Predicate<TValue>) | Returns all the elements in the list that match the condition in the specified predicate. |
FindIndex(int, int, Predicate<TValue>) | Searches for an element that matches the conditions defined by the specified predicate, and returns the index of the first occurrence within the range of elements in the list that starts at the specified index and contains the specified number of elements. |
FindIndex(int, Predicate<TValue>) | Searches for an element that matches the conditions defined by the specified predicate, and returns the index of the first occurrence within the range of elements in the list that extends from the specified index to the last element. |
FindIndex(Predicate<TValue>) | Searches for an element that matches the conditions defined by the specified predicate, and returns the index of the first occurrence within the entire list. |
FindLast(Predicate<TValue>) | Searches for an element that matches the conditions defined by the specified predicate, and returns the last occurrence within the entire list. |
FindLastIndex(int, int, Predicate<TValue>) | Searches for an element that matches the conditions defined by the specified predicate, and returns the index of the last occurrence within the range of elements in the list that contains the specified number of elements and ends at the specified index. |
FindLastIndex(int, Predicate<TValue>) | Searches for an element that matches the conditions defined by the specified predicate, and returns the index of the last occurrence within the range of elements in the list that extends from the first element to the specified index. |
FindLastIndex(Predicate<TValue>) | Searches for an element that matches the conditions defined by the specified predicate, and returns the index of the last occurrence within the entire list. |
ForEach(Action<TValue>) | Performs the specified action on each element of the list. |
GetEnumerator() | Returns an enumerator that iterates through the underlying List<T>. |
GetHashCode() | Returns a hash code for this value list. |
GetRange(int, int) | Creates a shallow copy of a range of elements in the source list. |
IndexOf(TValue) | Searches for the specified object and returns the index of the first occurrence within the entire list. |
IndexOf(TValue, int) | Searches for the specified object and returns the index of the first occurrence within the range of elements in the list that extends from the specified index to the last element. |
IndexOf(TValue, int, int) | Searches for the specified object and returns the index of the first occurrence within the range of elements in the list that starts at the specified index and contains the specified number of elements. |
LastIndexOf(TValue) | Searches for the specified object and returns the index of the last occurrence within the entire list. |
LastIndexOf(TValue, int) | Searches for the specified object and returns the index of the last occurrence within the range of elements in the list that extends from the first element to the specified index. |
LastIndexOf(TValue, int, int) | Searches for the specified object and returns the index of the last occurrence within the range of elements in the list that contains the specified number of elements and ends at the specified index. |
ToArray() | Copies the elements of the list to a new array. |
TrueForAll(Predicate<TValue>) | Determines whether every element in the list matches the conditions defined by the specified predicate. |
Operators
Name | Description |
---|---|
operator ==(ReadOnlyValueList?, ReadOnlyValueList?) | Determines whether two value lists are equal. Value lists are considered equal if they point to the same Dictionary with the same Key. |
operator !=(ReadOnlyValueList?, ReadOnlyValueList?) | Determines whether two value lists are not equal. Value lists are considered equal if they point to the same Dictionary with the same Key. |
Explicit Interface Implementations
Name | Description |
---|---|
ICollection<TValue>.Add(TValue) | Not supported. |
ICollection<TValue>.Clear() | Not supported. |
ICollection<TValue>.IsReadOnly | Gets a value indicating whether this list is read-only. Always returns true. |
ICollection<TValue>.Remove(TValue) | Not supported. |
IEnumerable<TValue>.GetEnumerator() | Returns an enumerator that iterates through the underlying List<T>. |
IList<TValue>.Insert(int, TValue) | Not supported. |
IList<TValue>.this[int] | Gets the element at the specified index. |
IList<TValue>.RemoveAt(int) | Not supported. |
IEnumerable.GetEnumerator() | Returns an enumerator that iterates through the underlying List<T>. |