SegmentLine Class

Represents a collection of segments.
public sealed class SegmentLine : List<Segment>, IList<Segment>, ICollection<Segment>, IList, 
    ICollection, IReadOnlyList<Segment>, IReadOnlyCollection<Segment>, IEnumerable<Segment>, 
    IEnumerable
Interfaces
Base Types

Constructors

SegmentLine()
Initializes a new instance of the SegmentLine class.
SegmentLine(IEnumerable<Segment>)
Initializes a new instance of the SegmentLine class.

Properties

int Length
Gets the width of the line.

Methods

int CellCount()
Gets the number of cells the segment line occupies.
void Prepend(Segment)
Preprends a segment to the line.

Extension Methods

T And<SegmentLine>(Action<SegmentLine>)
Performs the specified action on the given object and then returns the object. Useful for fluent testing patterns where additional assertions or operations are chained together in a readable manner.