Class Base1JaggedList<T>
Represents a jagged 1-based collection of Base1List<T>, useful for table-like structures.
Inheritance
Base1JaggedList<T>
Assembly: CoverageKiller2.dll
Syntax
public class Base1JaggedList<T> : IReadOnlyList<Base1List<T>>, IReadOnlyCollection<Base1List<T>>, IEnumerable<Base1List<T>>, IEnumerable
Type Parameters
Name |
Description |
T |
The element type of the inner lists.
|
Constructors
Base1JaggedList()
Declaration
Base1JaggedList(List<List<T>>)
Declaration
public Base1JaggedList(List<List<T>> list)
Parameters
Type |
Name |
Description |
List<List<T>> |
list |
|
Properties
Count
Declaration
public int Count { get; }
Property Value
this[int]
Declaration
public Base1List<T> this[int index] { get; }
Parameters
Type |
Name |
Description |
int |
index |
|
Property Value
LargestRow
Returns the largest column count across all rows.
Declaration
public Base1List<T> LargestRow { get; }
Property Value
LargestRowCount
Returns the largest column count across all rows.
Declaration
public int LargestRowCount { get; }
Property Value
Methods
Add(Base1List<T>)
Declaration
public void Add(Base1List<T> row)
Parameters
DumpGrid(Func<T, string>, string)
Dumps the contents of a Base1JaggedList<T>, projecting each cell through a delegate.
Declaration
public string DumpGrid(Func<T, string> projector, string message = null)
Parameters
Type |
Name |
Description |
Func<T, string> |
projector |
A projection function to convert each cell to a string.
|
string |
message |
Optional label for the dump output.
|
Returns
Type |
Description |
string |
A formatted string of the dumped grid.
|
Flatten()
Flattens all inner lists into a single sequence of elements.
Declaration
public IEnumerable<T> Flatten()
Returns
GetEnumerator()
Declaration
public IEnumerator<Base1List<T>> GetEnumerator()
Returns
IndexOf(Base1List<T>)
Declaration
public int IndexOf(Base1List<T> row)
Parameters
Returns
Insert(int, Base1List<T>)
Declaration
public void Insert(int index, Base1List<T> row)
Parameters
RemoveAt(int)
Declaration
public void RemoveAt(int index)
Parameters
Type |
Name |
Description |
int |
index |
|
SafeGet(int, int)
Declaration
public T SafeGet(int row, int col)
Parameters
Type |
Name |
Description |
int |
row |
|
int |
col |
|
Returns
SelectMany<TResult>(Func<T, IEnumerable<TResult>>)
Projects each element of each inner list and flattens the result.
Declaration
public IEnumerable<TResult> SelectMany<TResult>(Func<T, IEnumerable<TResult>> selector)
Parameters
Returns
Type Parameters
Implements
Extension Methods