NanoByte.Common 2.10.6
NanoByte.Common.Tasks Namespace Reference

Task system for managing long-running tasks and reporting progress to the user. More...

Classes

class  AnsiCliProgress
 Reports task progress updates using ANSI console output. More...
 
class  AnsiCliProgressContext
 Container for one or more ANSI console progress bars. More...
 
class  AnsiCliTaskHandler
 Informs the user about the progress of tasks and ask questions using ANSI console output. More...
 
class  CliProgress
 Reports task progress updates using console output. More...
 
class  CliTaskHandler
 Informs the user about the progress of tasks and ask questions using console output. More...
 
class  DialogTaskHandler
 Uses simple WinForms dialog boxes to inform the user about the progress of tasks. More...
 
class  ForEachTask
 A task that performs an operation once for each element of a collection. More...
 
class  GuiTaskHandlerBase
 Common base class for WinForms ITaskHandler implementations. More...
 
interface  ITask
 Represents an operation that can be cancelled and have its progress tracked. More...
 
interface  ITaskHandler
 Used to run and track ITasks and ask the user questions. Specific implementations provide different kinds of user interfaces. More...
 
class  ServiceTaskHandler
 Uses ILogger<TCategoryName>, ICredentialProvider and CancellationTokenSource from IServiceProvider if available. Executes tasks silently and suppresses any questions. More...
 
class  SilentTaskHandler
 Executes tasks silently and suppresses any questions. More...
 
class  SimplePercentTask
 A delegate-driven task. Progress is reported in percent. More...
 
class  SimpleTask
 A delegate-driven task. Only completion is reported, no intermediate progress. More...
 
class  TaskBase
 Abstract base class for ITask implementations. More...
 
class  TaskHandlerBase
 Common base class for ITaskHandler implementations. More...
 
class  TaskHandlerExtensions
 Extension methods for ITaskHandler More...
 
class  TaskRunDialog
 A dialog with a progress bar that runs and tracks the progress of an ITask. More...
 
struct  TaskSnapshot
 Represents a progress snapshot of an ITask. More...
 

Enumerations

enum  TaskState {
  Ready , Started , Header , Data ,
  Complete , WebError , IOError , Canceled
}
 Represents different states a (usually Web- or IO-related) task can be in. More...
 
enum  Verbosity { Batch = -1 , Normal = 0 , Verbose = 1 , Debug = 2 }
 
See also
ITaskHandler.Verbosity
More...
 

Functions

delegate void PercentProgressCallback (int percent)
 A callback to be called by a workload to report its progress in percent. More...
 

Detailed Description

Task system for managing long-running tasks and reporting progress to the user.

Enumeration Type Documentation

◆ TaskState

Represents different states a (usually Web- or IO-related) task can be in.

See also
TaskSnapshot.State
Enumerator
Ready 

The task is ready to begin.

Started 

The task has just been started.

Header 

Handling the header.

Data 

Handling the actual data.

Complete 

The task has been completed successfully.

WebError 

An error occurred during the task.

IOError 

An error occurred while writing the file.

Canceled 

The task was canceled by the user before completion.

◆ Verbosity

See also
ITaskHandler.Verbosity

Enumerator
Batch 

Automatically answer questions with defaults when possible. Avoid non-essential output and questions.

Normal 

Normal interactive operation.

Verbose 

Display additional information for troubleshooting.

Debug 

Display detailed information for debugging.

Function Documentation

◆ PercentProgressCallback()

delegate void NanoByte.Common.Tasks.PercentProgressCallback ( int  percent)

A callback to be called by a workload to report its progress in percent.

Parameters
percentThe workload's progress in percent.