Ejemplo n.º 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);
        }
Ejemplo n.º 2
0
        internal void ChildReportProgress(ChildProgressScope child)
        {
            if (this.IsDisposing)
            {
                return;
            }

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