Enhanced C#
Language of your choice: library documentation
Public fields | Public Member Functions | List of all members
Loyc.Collections.ReadOnlyListAsListSource< T > Class Template Reference

Helper type returned from LCExt.AsListSource<T>(IReadOnlyList<T>). More...


Source file:
Inheritance diagram for Loyc.Collections.ReadOnlyListAsListSource< T >:
Loyc.Collections.IListSource< T >

Remarks

Helper type returned from LCExt.AsListSource<T>(IReadOnlyList<T>).

A read-only wrapper that implements IListSource.

Public fields

int Count => _obj.Count
 
this[int index] => _obj[index]
 
this[int index, T defaultValue] => (uint)index >= (uint)_obj.Count ? defaultValue : _obj[index]
 

Public Member Functions

 ReadOnlyListAsListSource (IReadOnlyList< T > obj)
 
bool Contains (T item)
 
int IndexOf (T item)
 
void CopyTo (T[] array, int arrayIndex)
 
IEnumerator< T > GetEnumerator ()
 
TryGet (int index, out bool fail)
 
Slice_< T > Slice (int start, int count)
 
- Public Member Functions inherited from Loyc.Collections.IListSource< T >
IRange< T > Slice (int start, int count=int.MaxValue)
 Returns a sub-range of this list. More...