C# 클래스 Progression.Progress

파일 보기 프로젝트 열기: scottrippey/Progression

공개 메소드들

메소드 설명
BeginCustomTask ( IProgressCalculator calculator ) : ProgressTask

Starts a task using a custom progress calculator.

BeginFixedTask ( int steps ) : ProgressTask

Starts a task with a specific number of steps.

BeginUnknownTask ( int estimatedSteps, float estimatedWeight ) : ProgressTask

Starts a task with an unknown number of steps. As tasks complete, the progress will get nearer completion, but will never reach 100%.

BeginWeightedTask ( ) : ProgressTask

Starts a task with a specific number of steps. Progress is calculated proportionally for each step.

EndTask ( ) : void

Ends this task successfully, meaning that the 100% complete event will fire. This should be called before the task is disposed.

NextStep ( ) : void

Advances the current progress task to the next step. Fires ProgressChanged events.

SetCallback ( ProgressChangedCallback callback, ProgressDepth maxDepth ) : ProgressTask

Attaches the callback to fire when progress is reported. This is usually called at the beginning of the task. Returns the current progress task, so that methods may be chained.

SetMaxDepth ( ProgressDepth maxDepth ) : ProgressTask

An integer value that determines the maximum number of nested progress tasks. Progress reported at deeper levels will be ignored. All negative values are equivalent to "Auto". Returns the current progress task, so that methods may be chained.

SetTaskKey ( string newTaskKey ) : ProgressTask

Changes the current task's TaskKey. Returns the current progress task, so that methods may be chained.

SetTaskKey ( string newTaskKey, object newTaskArg ) : ProgressTask

Changes the current task's TaskKey. Returns the current progress task, so that methods may be chained.

비공개 메소드들

메소드 설명
GetCurrentTask ( ) : ProgressTask

Returns the top of the Progress stack. If the top is null, throws an appropriate exception.

메소드 상세

BeginCustomTask() 공개 정적인 메소드

Starts a task using a custom progress calculator.
public static BeginCustomTask ( IProgressCalculator calculator ) : ProgressTask
calculator IProgressCalculator Any custom progress calculator
리턴 Progression.Core.ProgressTask

BeginFixedTask() 공개 정적인 메소드

Starts a task with a specific number of steps.
public static BeginFixedTask ( int steps ) : ProgressTask
steps int The number of steps to be performed.
리턴 Progression.Core.ProgressTask

BeginUnknownTask() 공개 정적인 메소드

Starts a task with an unknown number of steps. As tasks complete, the progress will get nearer completion, but will never reach 100%.
public static BeginUnknownTask ( int estimatedSteps, float estimatedWeight ) : ProgressTask
estimatedSteps int /// Determines how "unknown" progress is calculated. This should be a rough estimate of the number of steps expected. /// As steps are completed, progress gets closer to 100%, but never reaches it. ///
estimatedWeight float /// A value between 0.0 and 1.0 that determines how much weight to place on the estimated steps. /// For example, if estimatedSteps is 100 and estimatedWeight is .75, /// then when 100 steps have completed, progress will be at 75%. /// /// This value cannot equal 0.0 or 1.0. ///
리턴 Progression.Core.ProgressTask

BeginWeightedTask() 공개 정적인 메소드

Starts a task with a specific number of steps. Progress is calculated proportionally for each step.
public static BeginWeightedTask ( ) : ProgressTask
리턴 Progression.Core.ProgressTask

EndTask() 공개 정적인 메소드

Ends this task successfully, meaning that the 100% complete event will fire. This should be called before the task is disposed.
public static EndTask ( ) : void
리턴 void

NextStep() 공개 정적인 메소드

Advances the current progress task to the next step. Fires ProgressChanged events.
public static NextStep ( ) : void
리턴 void

SetCallback() 공개 정적인 메소드

Attaches the callback to fire when progress is reported. This is usually called at the beginning of the task. Returns the current progress task, so that methods may be chained.
public static SetCallback ( ProgressChangedCallback callback, ProgressDepth maxDepth ) : ProgressTask
callback ProgressChangedCallback Attach a callback to the ProgressChanged event
maxDepth ProgressDepth An integer value that determines the maximum number of nested progress tasks. Progress reported at deeper levels will be ignored. All negative values are equivalent to "Auto".
리턴 Progression.Core.ProgressTask

SetMaxDepth() 공개 정적인 메소드

An integer value that determines the maximum number of nested progress tasks. Progress reported at deeper levels will be ignored. All negative values are equivalent to "Auto". Returns the current progress task, so that methods may be chained.
public static SetMaxDepth ( ProgressDepth maxDepth ) : ProgressTask
maxDepth ProgressDepth An integer value that determines the maximum number of nested progress tasks. Progress reported at deeper levels will be ignored. All negative values are equivalent to "Auto".
리턴 Progression.Core.ProgressTask

SetTaskKey() 공개 정적인 메소드

Changes the current task's TaskKey. Returns the current progress task, so that methods may be chained.
public static SetTaskKey ( string newTaskKey ) : ProgressTask
newTaskKey string Identifies the task being performed. Can be used for displaying progress.
리턴 Progression.Core.ProgressTask

SetTaskKey() 공개 정적인 메소드

Changes the current task's TaskKey. Returns the current progress task, so that methods may be chained.
public static SetTaskKey ( string newTaskKey, object newTaskArg ) : ProgressTask
newTaskKey string Identifies the task being performed. Can be used for displaying progress.
newTaskArg object Provides additional info about the task being performed
리턴 Progression.Core.ProgressTask