NanoByte.Common  2.6.1
NanoByte.Common.Tasks.SilentTaskHandler Class Reference

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

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

Public Member Functions

virtual void Dispose ()
 
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.
 
bool Ask (string question, bool? defaultAnswer=null, string? alternateMessage=null)
 Always returns defaultAnswer . More...
 
void Output (string title, string message)
 Displays multi-line text to the user.
 
void Output< T > (string title, IEnumerable< T > data)
 Displays tabular data to the user.
 
void Output< T > (string title, NamedCollection< T > data)
 Displays tree-like data to the user.
 
void Error (Exception exception)
 Displays an error message to the user.
 

Properties

virtual CancellationToken CancellationToken [get]
 
virtual ? ICredentialProvider CredentialProvider [get]
 
Verbosity Verbosity [get, set]
 Always returns Tasks.Verbosity.Batch. 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.

Member Function Documentation

◆ Ask()

bool NanoByte.Common.Tasks.SilentTaskHandler.Ask ( string  question,
bool?  defaultAnswer = null,
string?  alternateMessage = null 
)
inline

Always returns defaultAnswer .

Implements NanoByte.Common.Tasks.ITaskHandler.

Property Documentation

◆ Verbosity

Verbosity NanoByte.Common.Tasks.SilentTaskHandler.Verbosity
getset

Always returns Tasks.Verbosity.Batch.


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