Click or drag to resize
ReadOnlyListBaseT Class
ReadOnlyListBase is an abstract class that can be used as a base class for a read-only collection that needs to implement the generic IList<T> and non-generic IList collections. The derived class needs to override the Count property and the get part of the indexer. The implementation of all the other methods in IList<T> and IList are handled by ListBase.
Inheritance Hierarchy
SystemObject
  X3Platform.CollectionsReadOnlyCollectionBaseT
    X3Platform.CollectionsReadOnlyListBaseT

Namespace: X3Platform.Collections
Assembly: X3Platform.Support (in X3Platform.Support.dll) Version: 1.0.0.0 (2.0.0.0)
Syntax
[SerializableAttribute]
public abstract class ReadOnlyListBase<T> : ReadOnlyCollectionBase<T>, 
	IList<T>, ICollection<T>, IEnumerable<T>, IList, ICollection, 
	IEnumerable

Type Parameters

T

The ReadOnlyListBaseT type exposes the following members.

Constructors
  NameDescription
Protected methodReadOnlyListBaseT
Initializes a new instance of the ReadOnlyListBaseT class
Top
Methods
  NameDescription
Public methodContains
Determines if the list contains any item that compares equal to item. The implementation simply checks whether IndexOf(item) returns a non-negative value.
(Overrides ReadOnlyCollectionBaseTContains(T).)
Public methodConvertAllTOutput
Convert this collection of items by applying a delegate to each item in the collection. The resulting enumeration contains the result of applying converter to each item in this collection, in order.
(Inherited from ReadOnlyCollectionBaseT.)
Public methodCopyTo(T)
Copies all the items in the list, in order, to array, starting at index 0.
Public methodCopyTo(T, Int32)
Copies all the items in the collection into an array. Implemented by using the enumerator returned from GetEnumerator to get all the items and copy them to the provided array.
(Inherited from ReadOnlyCollectionBaseT.)
Public methodCopyTo(Int32, T, Int32, Int32)
Copies a range of elements from the list to array, starting at arrayIndex.
Public methodCountWhere
Counts the number of items in the collection that satisfy the condition defined by predicate.
(Inherited from ReadOnlyCollectionBaseT.)
Public methodEquals (Inherited from Object.)
Public methodExists
Determines if the collection contains any item that satisfies the condition defined by predicate.
(Inherited from ReadOnlyCollectionBaseT.)
Protected methodFinalize (Inherited from Object.)
Public methodFind
Finds the first item in the list that satisfies the condition defined by predicate. If no item matches the condition, than the default value for T (null or all-zero) is returned.
Public methodFindAll
Enumerates the items in the collection that satisfy the condition defined by predicate.
(Inherited from ReadOnlyCollectionBaseT.)
Public methodFindIndex(PredicateT)
Finds the index of the first item in the list that satisfies the condition defined by predicate. If no item matches the condition, -1 is returned.
Public methodFindIndex(Int32, PredicateT)
Finds the index of the first item, in the range of items extending from index to the end, that satisfies the condition defined by predicate. If no item matches the condition, -1 is returned.
Public methodFindIndex(Int32, Int32, PredicateT)
Finds the index of the first item, in the range of count items starting from index, that satisfies the condition defined by predicate. If no item matches the condition, -1 is returned.
Public methodFindLast
Finds the last item in the list that satisfies the condition defined by predicate. If no item matches the condition, than the default value for T (null or all-zero) is returned.
Public methodFindLastIndex(PredicateT)
Finds the index of the last item in the list that satisfies the condition defined by predicate. If no item matches the condition, -1 is returned.
Public methodFindLastIndex(Int32, PredicateT)
Finds the index of the last item, in the range of items extending from the beginning of the list to index, that satisfies the condition defined by predicate. If no item matches the condition, -1 is returned.
Public methodFindLastIndex(Int32, Int32, PredicateT)
Finds the index of the last item, in the range of count items ending at index, that satisfies the condition defined by predicate. If no item matches the condition, -1 is returned.
Public methodForEach
Performs the specified action on each item in this collection.
(Inherited from ReadOnlyCollectionBaseT.)
Public methodGetEnumerator
Enumerates all of the items in the list, in order. The item at index 0 is enumerated first, then the item at index 1, and so on.
(Overrides ReadOnlyCollectionBaseTGetEnumerator.)
Public methodGetHashCode (Inherited from Object.)
Public methodGetType (Inherited from Object.)
Public methodIndexOf(T)
Finds the index of the first item in the list that is equal to item.
Public methodIndexOf(T, Int32)
Finds the index of the first item, in the range of items extending from index to the end, that is equal to item.
Public methodIndexOf(T, Int32, Int32)
Finds the index of the first item, in the range of count items starting from index, that is equal to item.
Public methodLastIndexOf(T)
Finds the index of the last item in the list that is equal to item.
Public methodLastIndexOf(T, Int32)
Finds the index of the last item, in the range of items extending from the beginning of the list to index, that is equal to item.
Public methodLastIndexOf(T, Int32, Int32)
Finds the index of the last item, in the range of count items ending at index, that is equal to item.
Protected methodMemberwiseClone (Inherited from Object.)
Public methodRange
Returns a view onto a sub-range of this list. Items are not copied; the returned IList<T> is simply a different view onto the same underlying items.
Public methodToArray
Creates an array of the correct size, and copies all the items in the collection into the array, by calling CopyTo.
(Inherited from ReadOnlyCollectionBaseT.)
Public methodToString
Shows the string representation of the collection. The string representation contains a list of the items in the collection.
(Inherited from ReadOnlyCollectionBaseT.)
Public methodTrueForAll
Determines if all of the items in the collection satisfy the condition defined by predicate.
(Inherited from ReadOnlyCollectionBaseT.)
Public methodTryFind
Finds the first item in the list that satisfies the condition defined by predicate.
Public methodTryFindLast
Finds the last item in the list that satisfies the condition defined by predicate.
Top
Properties
  NameDescription
Public propertyCount
The property must be overridden by the derived class to return the number of items in the list.
(Overrides ReadOnlyCollectionBaseTCount.)
Public propertyItem
The get part of the indexer must be overridden by the derived class to get values of the list at a particular index.
Top
See Also