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
파일 보기 프로젝트 열기: kamsar/Kamsar.WebConsole 1 사용 예제들

공개 메소드들

메소드 설명
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