Table of Contents

Class PipedInputOptions

Namespace
SharpConsoleUI.Configuration
Assembly
SharpConsoleUI.dll

Configuration for capturing text piped into the application via stdin (PipedInput).

public record PipedInputOptions : IEquatable<PipedInputOptions>
Inheritance
PipedInputOptions
Implements
Inherited Members
Extension Methods

Remarks

Reading redirected stdin cannot be given a single correct deadline: echo x | app ends immediately, while tail -f log | app is designed never to end. The capture therefore runs off the startup path, and these options tune how long each side is prepared to wait for it.

Constructors

PipedInputOptions(bool, int, bool, int, string, string)

Configuration for capturing text piped into the application via stdin (PipedInput).

public PipedInputOptions(bool Enabled = true, int PreUiTimeoutMs = 2000, bool ShowDialog = true, int DialogDelayMs = 300, string DialogTitle = "Reading input", string DialogMessage = "Reading piped input from stdin...")

Parameters

Enabled bool

Whether redirected stdin is captured at all. Set false to leave stdin entirely to the application, in which case PipedInput is always null.

PreUiTimeoutMs int

How long reading PipedInput before the UI starts waits for the capture to finish, in milliseconds. On timeout the property returns the text received so far rather than continuing to block.

ShowDialog bool

Whether the system shows a cancellable progress dialog when the capture is still running after the UI is up. Set false to let the capture continue silently in the background.

DialogDelayMs int

How long the capture may remain pending once the UI is up before the dialog appears, in milliseconds. Keeps the dialog from flashing for input that arrives promptly.

DialogTitle string

Title of the progress dialog.

DialogMessage string

Status text shown in the progress dialog while the capture runs.

Remarks

Reading redirected stdin cannot be given a single correct deadline: echo x | app ends immediately, while tail -f log | app is designed never to end. The capture therefore runs off the startup path, and these options tune how long each side is prepared to wait for it.

Properties

DialogDelayMs

How long the capture may remain pending once the UI is up before the dialog appears, in milliseconds. Keeps the dialog from flashing for input that arrives promptly.

public int DialogDelayMs { get; init; }

Property Value

int

DialogMessage

Status text shown in the progress dialog while the capture runs.

public string DialogMessage { get; init; }

Property Value

string

DialogTitle

Title of the progress dialog.

public string DialogTitle { get; init; }

Property Value

string

Enabled

Whether redirected stdin is captured at all. Set false to leave stdin entirely to the application, in which case PipedInput is always null.

public bool Enabled { get; init; }

Property Value

bool

PreUiTimeoutMs

How long reading PipedInput before the UI starts waits for the capture to finish, in milliseconds. On timeout the property returns the text received so far rather than continuing to block.

public int PreUiTimeoutMs { get; init; }

Property Value

int

ShowDialog

Whether the system shows a cancellable progress dialog when the capture is still running after the UI is up. Set false to let the capture continue silently in the background.

public bool ShowDialog { get; init; }

Property Value

bool