C# Class NanoByte.Common.Tasks.CliTaskHandler

Uses the stderr stream to inform the user about the progress of tasks.
Inheritance: TaskHandlerBase
ファイルを表示 Open project: nano-byte/common Class Usage Examples

Public Methods

Method Description
CliTaskHandler ( ) : System

Sets up Ctrl+C handling and console Log output.

Error ( Exception exception ) : void
Output ( string title, string message ) : void
RunTask ( ITask task ) : void

Protected Methods

Method Description
Ask ( string question, MsgSeverity severity ) : bool
BuildCrendentialProvider ( ) : ICredentialProvider
Dispose ( bool disposing ) : void
LogHandler ( LogSeverity severity, string message ) : void

Prints Log messages to the Console based on their LogSeverity and the current Verbosity level.

Private Methods

Method Description
CancelKeyPressHandler ( object sender, ConsoleCancelEventArgs e ) : void

Handles Ctrl+C key presses.

Method Details

Ask() protected method

protected Ask ( string question, MsgSeverity severity ) : bool
question string
severity MsgSeverity
return bool

BuildCrendentialProvider() protected method

protected BuildCrendentialProvider ( ) : ICredentialProvider
return ICredentialProvider

CliTaskHandler() public method

Sets up Ctrl+C handling and console Log output.
public CliTaskHandler ( ) : System
return System

Dispose() protected method

protected Dispose ( bool disposing ) : void
disposing bool
return void

Error() public method

public Error ( Exception exception ) : void
exception System.Exception
return void

LogHandler() protected method

Prints Log messages to the Console based on their LogSeverity and the current Verbosity level.
protected LogHandler ( LogSeverity severity, string message ) : void
severity LogSeverity The type/severity of the entry.
message string The message text of the entry.
return void

Output() public method

public Output ( string title, string message ) : void
title string
message string
return void

RunTask() public method

public RunTask ( ITask task ) : void
task ITask
return void