API Reference
Class
StyledLine
One line of styled spans (no line breaks). Immutable once created.
Inheritance
- Object
- StyledLine
Usage
Explore 43 API references to this type
This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.
Returned or exposed by 20
- Method HighlightStyles.ToLines
- Method StatusLine.Compose
- Property PresentedValue.Line
- Method TestRunText.FailureLines
- Method ConsoleTextLayout.Lines
- Method StyledLine.From
- Method StyledLine.WithBaseStyle
- Property StyledLine.Empty
- Property StyledText.Lines
- Method TextWrapper.Truncate
- Method TextWrapper.TruncateMiddle
- Method TextWrapper.Wrap
- Method CellMap.Legend
- Method CodeView.Rows
- Method ExceptionView.Lines
- Method FooterBar.Line
- Property FooterBar.Message
- Property FooterBar.Right
- Method ProgressColumn.Render
- Method SummaryBar.Line
Accepted by parameters 23
- Method Region.Write
- Extension method ITerminalTarget.WriteLines
- Method TerminalTargetExtensions.WriteLines
- Constructor PresentedValue.PresentedValue
- Method InlineOutput.WriteInline
- Method InlineOutput.WriteLine
- Method ITerminalOutput.WriteInline
- Method ITerminalOutput.WriteLine
- Method LineOutput.WriteInline
- Method LineOutput.WriteLine
- Method VtOutput.WriteInline
- Method VtOutput.WriteInPlace
- Method VtOutput.WriteLine
- Method Terminal.WriteLines
- Constructor StyledText.StyledText
- Method TextWrapper.Truncate
- Method TextWrapper.TruncateMiddle
- Method TextWrapper.Wrap
- Extension method FooterBar.WithMessage
- Extension method FooterBar.WithRight
- Method FooterBarFluent.WithMessage
- Method FooterBarFluent.WithRight
- Method ProgressColumns.Custom
Constructors
public StyledLine(IEnumerable<TextSpan> spans) #Creates a line from spans. Line breaks inside spans are replaced with spaces.
Parameters
- spans System.Collections.Generic.IEnumerable<ConsoleMonster.Text.TextSpan>
- The spans.
Methods
public static StyledLine From(String text, Style style = default) #Returns:
StyledLineCreates a single-span line.
Parameters
- text System.String
- The text.
- style ConsoleMonster.Styling.Style = default
- The style.
Returns
The line.
public IEnumerator<TextSpan> GetEnumerator() #Returns:
IEnumerator<TextSpan>Returns an enumerator that iterates through the collection.
Returns
An enumerator that can be used to iterate through the collection.
public override String ToString() #Returns:
StringReturns a string that represents the current object.
Returns
A string that represents the current object.
public StyledLine WithBaseStyle(Style baseStyle) #Returns:
StyledLineReturns a copy with baseStyle layered under every span.
Parameters
- baseStyle ConsoleMonster.Styling.Style
- The style underneath.
Returns
A new line.
Inherited Methods
Properties
public TextSpan this[Int32 index] { get; } #Gets the element at the specified index in the read-only list.
Parameters
- index System.Int32
- The zero-based index of the element to get.