Extension methods for Loyc Collection interfaces (such as IListSource{T}).
The source code for adapter extension methods such as AsReadOnly() is now placed in the source file for each adapter class (e.g. CollectionAsReadOnly.cs) to make it easier to use parts of Loyc.Essentials rather than the entire library (other "decoupling" suggestions are welcome.)
|
| static IListSource< T > | AsListSource< T > (this IList< T > c) |
| | Adapter: treats any IList{T} object as IListSource{T}. More...
|
| |
| static IListSource< T > | AsListSource< T > (this List< T > c) |
| | Adapter: treats List{T} as IListSource{T}. More...
|
| |
| static IListSource< T > | AsListSource< T > (this T[] c) |
| | Adapter: treats T[] as IListSource{T}. More...
|
| |
| static IListSource< T > | AsListSource< T > (this IListAndListSource< T > c) |
| | No-op. More...
|
| |
| static IList< T > | AsList< T > (this IListSource< T > c) |
| | Converts any IListSource{T} object to a read-only IList{T}. More...
|
| |
| static ListSourceAsSparse< T > | AsSparse< T > (this IListSource< T > list) |
| | Treats a non-sparse list as a read-only sparse list with no empty spaces. More...
|
| |
| static ISparseListSource< T > | AsSparse< T > (this ISparseListSource< T > list) |
| | Returns list itself. This overload exists to prevent you from accidentally wrapping a sparse list in ListSourceAsSparse{T}, which would block access to knowledge of any empty spaces in the list. More...
|
| |
|
static NegListSlice< T > | Slice< T > (this INegListSource< T > list, int start, int count=int.MaxValue) |
| |
|
static NegListSource< T > | AsNegList< T > (this IListSource< T > list, int zeroOffset) |
| |
| static IListSource< T > | AsListSource< T > (this IReadOnlyList< T > c) |
| | Adapter: treats any IReadOnlyList{T} object as IListSource{T}. More...
|
| |
| static IListSource< T > | AsListSource< T > (this IListSource< T > c) |
| | No-op. More...
|
| |
| static ICollection< T > | AsCollection< T > (this IReadOnlyCollection< T > c) |
| | Adapter: treats any IReadOnlyCollection{T} as a read-only ICollection{T}. More...
|
| |
static IReadOnlyCollection
< TResult > | UpCast< T, TResult > (this IReadOnlyCollection< T > source) |
| |
|
static IListSource< TResult > | UpCast< T, TResult > (this IListSource< T > source) |
| |
|
static string | Join (this System.Collections.IEnumerable list, string separator) |
| |