C# Класс Progression.Progress

Показать файл Открыть проект

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

Метод Описание
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