C# Класс Kamsar.WebConsole.SubtaskProgressStatus

An implementation of IProgressStatus designed to be used as a "subtask" within a parent IProgressStatus. This encapsulates the idea of task progress, e.g. the method receiving this progress object need only be concerned with its own 1-100% progress, not the overall progress of all tasks. The total progress of the console is scaled proprotionally to the number of total tasks provided.
Наследование: IProgressStatus, IDisposable
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
Dispose ( ) : void
Report ( int percent ) : void
Report ( int percent, string statusMessage ) : void
Report ( int percent, string statusMessage, MessageType type ) : void
ReportException ( Exception exception ) : void
ReportStatus ( string statusMessage ) : void
ReportStatus ( string statusMessage, MessageType type ) : void
ReportTransientStatus ( string statusMessage ) : void
SubtaskProgressStatus ( string taskName, IProgressStatus mainTask, int subtaskIndex, int subtaskCount ) : System

Default constructor. Automatically manages transient status for you.

SubtaskProgressStatus ( string taskName, IProgressStatus mainTask, int subtaskIndex, int subtaskCount, bool automaticTransientStatus ) : System

Default constructor

Приватные методы

Метод Описание
InitializeStatus ( ) : void
SetProgress ( int taskProgress ) : void
SetRangeTaskProgress ( int startPercentage, int endPercentage, int taskPercent ) : void

Sets the progress of the whole based on the progress within a percentage range of the main progress (e.g. 0-100% of a task within the global range of 0-20%)

SetTaskProgress ( int taskNumber, int totalTasks, int taskPercent ) : void

Sets the progress of the whole based on the progress within a sub-task of the main progress (e.g. 0-100% of a task within the global range of 0-20%)

Описание методов

Dispose() публичный Метод

public Dispose ( ) : void
Результат void

Report() публичный Метод

public Report ( int percent ) : void
percent int
Результат void

Report() публичный Метод

public Report ( int percent, string statusMessage ) : void
percent int
statusMessage string
Результат void

Report() публичный Метод

public Report ( int percent, string statusMessage, MessageType type ) : void
percent int
statusMessage string
type MessageType
Результат void

ReportException() публичный Метод

public ReportException ( Exception exception ) : void
exception System.Exception
Результат void

ReportStatus() публичный Метод

public ReportStatus ( string statusMessage ) : void
statusMessage string
Результат void

ReportStatus() публичный Метод

public ReportStatus ( string statusMessage, MessageType type ) : void
statusMessage string
type MessageType
Результат void

ReportTransientStatus() публичный Метод

public ReportTransientStatus ( string statusMessage ) : void
statusMessage string
Результат void

SubtaskProgressStatus() публичный Метод

Default constructor. Automatically manages transient status for you.
public SubtaskProgressStatus ( string taskName, IProgressStatus mainTask, int subtaskIndex, int subtaskCount ) : System
taskName string Name of the subtask to run
mainTask IProgressStatus The progress status of the main task (or parent subtask)
subtaskIndex int The index of this subtask among total subtask count (used to calculate offset progress)
subtaskCount int The total number of subtasks in the main task (or parent subtask)
Результат System

SubtaskProgressStatus() публичный Метод

Default constructor
public SubtaskProgressStatus ( string taskName, IProgressStatus mainTask, int subtaskIndex, int subtaskCount, bool automaticTransientStatus ) : System
taskName string Name of the subtask to run
mainTask IProgressStatus The progress status of the main task (or parent subtask)
subtaskIndex int The index of this subtask among total subtask count (used to calculate offset progress)
subtaskCount int The total number of subtasks in the main task (or parent subtask)
automaticTransientStatus bool If true, transient status will be automatically managed for you for this subtask ($taskname running for xx seconds). Make sure to dispose the subtask!
Результат System