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
        /// <summary> Tracks progress as the source is enumerated.
        ///
        /// Since the number of items is unknown,
        /// as tasks complete, the progress will get nearer completion,
        /// but will never reach 100%.
        /// </summary>
        /// <param name="source">Note: If the source is a Collection, then the Count will be used and the estimatedSteps will be ignored.</param>
        /// <param name="estimatedCount">
        /// 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.
        /// </param>
        /// <param name="estimatedWeight">
        /// 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.
        /// </param>
        public static ProgressEnumerator <T> WithProgressUnknown <T>(this IEnumerable <T> source, int estimatedCount, float estimatedWeight)
        {
            // Just in case the source is a Collection or List, we can use the Count so that the task isn't "Unknown":
            var sourceCollection = source as ICollection <T>;

            return(new ProgressEnumerator <T>(source, (sourceCollection != null) ? Progress.BeginFixedTask(sourceCollection.Count) : Progress.BeginUnknownTask(estimatedCount, estimatedWeight)));
        }
 /// <summary> Tracks progress as the source is enumerated. </summary>
 /// <param name="source"></param>
 /// <param name="sourceCount">Used to calculate progress as items are enumerated. If the count is unknown, use the "WithProgressUnknown" overload.</param>
 public static ProgressEnumerator <T> WithProgress <T>(this IEnumerable <T> source, int sourceCount)
 {
     return(new ProgressEnumerator <T>(source, Progress.BeginFixedTask(sourceCount)));
 }
        // Note: These methods wrap an IEnumerable, monitoring progress as the sequence is enumerated.

        /// <summary> Tracks progress as the source is enumerated. </summary>
        /// <param name="source">The Count property will be used to calculate progress as items are enumerated.</param>
        public static ProgressEnumerator <T> WithProgress <T>(this ICollection <T> source)
        {
            return(new ProgressEnumerator <T>(source, Progress.BeginFixedTask(source.Count)));
        }