Interface IInteractiveTui<TPrimary, TSecondary>
An interface for your interactive user interface for terminal apps
Namespace
Syntax
public interface IInteractiveTui<TPrimary, TSecondary>
Type Parameters
| Name | Description |
|---|---|
| TPrimary | |
| TSecondary |
Properties
AcceptsEmptyData
Whether empty data is accepted
Property Value
Declaration
bool AcceptsEmptyData { get; }
HelpPages
A list of help pages
PrimaryDataSource
An array, a dictionary, a list, or an enumerable that holds data (pane one)
Property Value
Declaration
IEnumerable<TPrimary> PrimaryDataSource { get; }
RefreshInterval
How many milliseconds to wait before refreshing? Only applies to single-pane interactive TUI instances. 0 to disable.
Property Value
Declaration
int RefreshInterval { get; }
SecondPaneInteractable
Whether the user can switch to the second path
Property Value
Declaration
bool SecondPaneInteractable { get; }
SecondaryDataSource
An array, a dictionary, a list, or an enumerable that holds data (pane two)
Property Value
Declaration
IEnumerable<TSecondary> SecondaryDataSource { get; }
Methods
GetEntryFromItem(TPrimary)
Gets an entry string from a specified item for listing
Returns
Declaration
string GetEntryFromItem(TPrimary item)
Parameters
| Name | Type | Description |
|---|---|---|
| item | TPrimary | Target item |
GetEntryFromItemSecondary(TSecondary)
Gets an entry string from a specified item for listing
Returns
Declaration
string GetEntryFromItemSecondary(TSecondary item)
Parameters
| Name | Type | Description |
|---|---|---|
| item | TSecondary | Target item |
GetInfoFromItem(TPrimary)
Gets the info from the item
Returns
The rendered info so that InteractiveTuiTools can handle its rendering
Declaration
string GetInfoFromItem(TPrimary item)
Parameters
| Name | Type | Description |
|---|---|---|
| item | TPrimary | Target item |
GetInfoFromItemSecondary(TSecondary)
Gets the info from the item
Returns
The rendered info so that InteractiveTuiTools can handle its rendering
Declaration
string GetInfoFromItemSecondary(TSecondary item)
Parameters
| Name | Type | Description |
|---|---|---|
| item | TSecondary | Target item |
GetStatusFromItem(TPrimary)
Gets the status from the item
Returns
Declaration
string GetStatusFromItem(TPrimary item)
Parameters
| Name | Type | Description |
|---|---|---|
| item | TPrimary | Target item |
GetStatusFromItemSecondary(TSecondary)
Gets the status from the item
Returns
Declaration
string GetStatusFromItemSecondary(TSecondary item)
Parameters
| Name | Type | Description |
|---|---|---|
| item | TSecondary | Target item |
HandleExit()
Handles exiting the interactive TUI
Declaration
void HandleExit()