mirror of
https://github.com/spectreconsole/spectre.console.git
synced 2025-10-25 15:19:23 +00:00
- A `Text` object should not be able to justify itself. All justification needs to be done by a parent. - Apply colors and styles to part of a `Text` object - Markup parser should return a `Text` object
19 lines
507 B
C#
19 lines
507 B
C#
using System.Collections.Generic;
|
|
using System.Diagnostics.CodeAnalysis;
|
|
using System.Linq;
|
|
|
|
namespace Spectre.Console.Composition
|
|
{
|
|
/// <summary>
|
|
/// Represents a line of segments.
|
|
/// </summary>
|
|
[SuppressMessage("Naming", "CA1710:Identifiers should have correct suffix")]
|
|
public sealed class SegmentLine : List<Segment>
|
|
{
|
|
/// <summary>
|
|
/// Gets the length of the line.
|
|
/// </summary>
|
|
public int Length => this.Sum(line => line.Text.Length);
|
|
}
|
|
}
|