コード例 #1
0
        public IProgressScope AddChildScope(string name, double weight)
        {
            var childScope = new ChildProgressScope(name, this, weight);

            _childScopes.Add(childScope);
            _totalWeight += weight;
            this.UpdateChildrenProgress();

            return(childScope);
        }
コード例 #2
0
        internal void ChildReportProgress(ChildProgressScope child)
        {
            if (this.IsDisposing)
            {
                return;
            }

            this.UpdateChildrenProgress();
            if (ProgressScope.ProgressEquals(child.Progress, 1.0))
            {
                child.Dispose();
            }
        }