LiveDisplay

Represents a live display.

Represents a live display.

Constructors

public LiveDisplay(IAnsiConsole console, IRenderable target)

Initializes a new instance of the LiveDisplay class.

Parameters:

console (IAnsiConsole)
The console.
target (IRenderable)
The target renderable to update.

Properties

AutoClear : bool

Gets or sets a value indicating whether or not the live display should be cleared when it's done. Defaults to false.

Cropping : VerticalOverflowCropping

Gets or sets the vertical overflow cropping strategy.

Overflow : VerticalOverflow

Gets or sets the vertical overflow strategy.

Methods

public void Start(Action<LiveDisplayContext> action)

Starts the live display.

Parameters:

action (Action<LiveDisplayContext>)
The action to execute.
public T Start<T>(Func<LiveDisplayContext, T> func)

Starts the live display.

Parameters:

func (Func<LiveDisplayContext, T>)
The action to execute.

Returns:

The result.

public Task StartAsync(Func<LiveDisplayContext, Task> func)

Starts the live display.

Parameters:

func (Func<LiveDisplayContext, Task>)
The action to execute.

Returns:

The result.

public Task<T> StartAsync<T>(Func<LiveDisplayContext, Task<T>> func)

Starts the live display.

Parameters:

func (Func<LiveDisplayContext, Task<T>>)
The action to execute.

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.