Represents a live display.
Constructors
public LiveDisplay(IAnsiConsole console, IRenderable target)
Initializes a new instance of the LiveDisplay class.
Parameters:
console (IAnsiConsole)target (IRenderable)Properties
AutoClear
: boolGets or sets a value indicating whether or not the live display should be cleared when it's done. Defaults to false.
Cropping
: VerticalOverflowCroppingGets or sets the vertical overflow cropping strategy.
Overflow
: VerticalOverflowGets or sets the vertical overflow strategy.
Methods
public void Start(Action<LiveDisplayContext> action)
Starts the live display.
Parameters:
action (Action<LiveDisplayContext>)public T Start<T>(Func<LiveDisplayContext, T> func)
Starts the live display.
Parameters:
func (Func<LiveDisplayContext, T>)Returns:
The result.
public Task StartAsync(Func<LiveDisplayContext, Task> func)
Starts the live display.
Parameters:
func (Func<LiveDisplayContext, Task>)Returns:
The result.
public Task<T> StartAsync<T>(Func<LiveDisplayContext, Task<T>> func)
Starts the live display.
Parameters:
func (Func<LiveDisplayContext, Task<T>>)Returns:
The result.
Extension Methods
LiveDisplay AutoClear(this LiveDisplay live, bool enabled)Sets whether or not auto clear is enabled. If enabled, the live display will be cleared when done.
Returns:
The same instance so that multiple calls can be chained.
LiveDisplay Cropping(this LiveDisplay live, VerticalOverflowCropping cropping)Sets the vertical overflow cropping strategy.
Returns:
The same instance so that multiple calls can be chained.
LiveDisplay Overflow(this LiveDisplay live, VerticalOverflow overflow)Sets the vertical overflow strategy.
Returns:
The same instance so that multiple calls can be chained.