private void TellModesWeAreEndingIteration(IModeCategory node) { if (node != null) { foreach (var mode in node.Children) { if (mode is IIterationSensitive c) { c.IterationEnding(CurrentIteration, TotalIterations); } TellModesWeAreEndingIteration(mode as IModeCategory); } } }
private void TellModesWeAreEndingIteration(IModeCategory node) { if (node != null) { foreach (var mode in node.Children) { var c = mode as IIterationSensitive; if (c != null) { c.IterationEnding(this.CurrentIteration, this.TotalIterations); } c = null; TellModesWeAreEndingIteration(mode as IModeCategory); } } }
private void TellModesWeAreStartingNewIteration(IModeCategory node) { if (node != null) { foreach (var mode in node.Children) { if (mode is IIterationSensitive c) { Status = String.Concat("Running Iteration ", (CurrentIteration + 1), " of ", TotalIterations, " : Initializing ", mode.ModeName); GetProgress = () => mode.Progress; c.IterationStarting(CurrentIteration, TotalIterations); } TellModesWeAreStartingNewIteration(mode as IModeCategory); } } }
private void TellModesWeAreStartingNewIteration(IModeCategory node) { if (node != null) { foreach (var mode in node.Children) { var c = mode as IIterationSensitive; if (c != null) { this.Status = String.Concat("Running Iteration ", (this.CurrentIteration + 1), " of ", this.TotalIterations, " : Initializing ", mode.ModeName); this.GetProgress = () => mode.Progress; c.IterationStarting(this.CurrentIteration, this.TotalIterations); } c = null; TellModesWeAreStartingNewIteration(mode as IModeCategory); } } }
private void TellModesWeAreStartingNewIteration(IModeCategory node) { if ( node != null ) { foreach ( var mode in node.Children ) { var c = mode as IIterationSensitive; if ( c != null ) { this.Status = String.Concat( "Running Iteration ", ( this.CurrentIteration + 1 ), " of ", this.TotalIterations, " : Initializing ", mode.ModeName ); this.GetProgress = () => mode.Progress; c.IterationStarting( this.CurrentIteration, this.TotalIterations ); } c = null; TellModesWeAreStartingNewIteration( mode as IModeCategory ); } } }
private void TellModesWeAreEndingIteration(IModeCategory node) { if ( node != null ) { foreach ( var mode in node.Children ) { var c = mode as IIterationSensitive; if ( c != null ) { c.IterationEnding( this.CurrentIteration, this.TotalIterations ); } c = null; TellModesWeAreEndingIteration( mode as IModeCategory ); } } }