NanoByte.Common  2.10.5
NanoByte.Common.Tasks.SilentTaskHandler Class Reference

Executes tasks silently and suppresses any questions. More...

Inheritance diagram for NanoByte.Common.Tasks.SilentTaskHandler:
NanoByte.Common.Tasks.TaskHandlerBase NanoByte.Common.Tasks.ITaskHandler NanoByte.Common.Tasks.ServiceTaskHandler

Public Member Functions

override void Output (string title, string message)
 Displays multi-line text to the user.
override void Error (Exception exception)
 Displays an error message to the user.
- Public Member Functions inherited from NanoByte.Common.Tasks.TaskHandlerBase
virtual void Dispose ()
virtual void RunTask (ITask task)
 Runs an ITask and tracks its progress. Returns once the task has been completed.
bool Ask (string question, bool? defaultAnswer=null, string? alternateMessage=null)
 Asks the user a Yes/No/Cancel question.
virtual void Output< T > (string title, IEnumerable< T > data)
 Displays tabular data to the user.
virtual void Output< T > (string title, NamedCollection< T > data)
 Displays tree-like data to the user.

Protected Member Functions

override bool AskInteractive (string question, bool defaultAnswer)
 Always returns defaultAnswer . More...

Additional Inherited Members

- 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

Executes tasks silently and suppresses any questions.

This class is thread-safe.

Member Function Documentation

◆ AskInteractive()

override bool NanoByte.Common.Tasks.SilentTaskHandler.AskInteractive ( string  question,
bool  defaultAnswer 

Always returns defaultAnswer .

Implements NanoByte.Common.Tasks.TaskHandlerBase.

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