mirror of
https://github.com/spectreconsole/spectre.console.git
synced 2025-10-25 15:19:23 +00:00
26 lines
620 B
C#
26 lines
620 B
C#
using System.Collections.Generic;
|
|
using Spectre.Console.Rendering;
|
|
|
|
namespace Spectre.Console
|
|
{
|
|
internal sealed class ControlSequence : Renderable
|
|
{
|
|
private readonly Segment _segment;
|
|
|
|
public ControlSequence(string control)
|
|
{
|
|
_segment = Segment.Control(control);
|
|
}
|
|
|
|
protected override Measurement Measure(RenderContext context, int maxWidth)
|
|
{
|
|
return new Measurement(0, 0);
|
|
}
|
|
|
|
protected override IEnumerable<Segment> Render(RenderContext context, int maxWidth)
|
|
{
|
|
yield return _segment;
|
|
}
|
|
}
|
|
}
|