NanoByte.Common  2.7.5
NanoByte.Common.Tasks.AnsiCliTaskHandler Class Reference

Informs the user about the progress of tasks and ask questions using ANSI console output. More...

Inheritance diagram for NanoByte.Common.Tasks.AnsiCliTaskHandler:
NanoByte.Common.Tasks.CliTaskHandler NanoByte.Common.Tasks.TaskHandlerBase NanoByte.Common.MarshalNoTimeout NanoByte.Common.Tasks.ITaskHandler

Public Member Functions

override void RunTask (ITask task)
 Runs an ITask and tracks its progress. Returns once the task has been completed. The task may be executed on a different thread.
 
override void Output (string title, string message)
 Displays multi-line text to the user.
 
override void Output< T > (string title, IEnumerable< T > data)
 Displays tabular data to the user.
 
override void Output< T > (string title, NamedCollection< T > data)
 Displays tree-like data to the user.
 
- Public Member Functions inherited from NanoByte.Common.Tasks.CliTaskHandler
 CliTaskHandler ()
 Creates a new CLI task handler. Registers a Log.Handler. More...
 
override void Dispose ()
 Unregisters the Log.Handler. More...
 
override void Error (Exception exception)
 Displays an error message to the user.
 
- Public Member Functions inherited from NanoByte.Common.Tasks.TaskHandlerBase
bool Ask (string question, bool? defaultAnswer=null, string? alternateMessage=null)
 Asks the user a Yes/No/Cancel question.
 
- Public Member Functions inherited from NanoByte.Common.MarshalNoTimeout
override? object InitializeLifetimeService ()
 

Protected Member Functions

override void LogHandler (LogSeverity severity, string message)
 Prints Log messages to the Console based on their LogSeverity and the current Verbosity level.
 
override bool AskInteractive (string question, bool defaultAnswer)
 Asks the user a Yes/No/Cancel question.
 

Properties

override? ICredentialProvider CredentialProvider [get]
 
- Properties inherited from NanoByte.Common.Tasks.CliTaskHandler
override? ICredentialProvider CredentialProvider [get]
 
override bool IsInteractive [get]
 
- Properties inherited from NanoByte.Common.Tasks.TaskHandlerBase
CancellationTokenSource CancellationTokenSource = new() [get]
 Used to signal the CancellationToken. More...
 
CancellationToken CancellationToken [get]
 
virtual ? ICredentialProvider CredentialProvider [get]
 
Verbosity Verbosity [get, set]
 
virtual bool IsInteractive [get]
 Indicates whether the user can provide input. More...
 
- Properties inherited from NanoByte.Common.Tasks.ITaskHandler
CancellationToken CancellationToken [get]
 Used to signal when the user wishes to cancel the entire current process (and any ITasks it includes). More...
 
ICredentialProviderCredentialProvider [get]
 Used to ask the user or a keyring for NetworkCredentials for specific Uris; can be null. More...
 
Verbosity Verbosity [get, set]
 The detail level of messages displayed to the user. More...
 

Detailed Description

Informs the user about the progress of tasks and ask questions using ANSI console output.


The documentation for this class was generated from the following file: