Table of Contents

Class CliFormatter

Namespace
ItTiger.TigerCli.Primitives
Assembly
ItTiger.TigerCli.dll
Formats arbitrary cell values before they are escaped or interpreted as markup by the rendering pipeline.
public sealed class CliFormatter
Inheritance
CliFormatter
Inherited Members

Fields

NoOpFormatter

Formatter that returns obj?.ToString() ?? string.Empty.
public static readonly CliFormatter NoOpFormatter

Field Value

CliFormatter

Methods

Clone(CliFormatter?)

Creates a copy of a formatter, or null when formatter is null.
public static CliFormatter? Clone(CliFormatter? formatter)

Parameters

formatter CliFormatter

Returns

CliFormatter

Format(object?)

Formats a value; null formats as an empty string.
public string Format(object? value)

Parameters

value object

Returns

string

FromDelegate(Func<object?, string>)

Creates a formatter backed by an application-supplied delegate.
public static CliFormatter FromDelegate(Func<object?, string> formatter)

Parameters

formatter Func<object, string>

Returns

CliFormatter

FromFormatString(string)

Creates a formatter that applies formatString to IFormattable values and falls back to ToString() for other values.
public static CliFormatter FromFormatString(string formatString)

Parameters

formatString string

Returns

CliFormatter