private void DropStatusMessage(bool force = false) { if (null != _progressInfo) { _progressInfo.CalculateProgress(force); _progressInfo.WriteProgress(this); } }
public static void BlockWithProgress(CyCmdlet cmdlet, List <Task> tasks, int activityKey, string activity, string statusDescription) { var progressInfoCalculator = new PowershellProgressInfoCalculator(activityKey, activity, tasks); do { progressInfoCalculator.CalculateProgress(); progressInfoCalculator.WriteProgress(cmdlet); Task.Delay(100).Wait(); cmdlet.Logger.FlushLogsToPowershellConsole(); } while (!tasks.TrueForAll(x => x.IsCompleted)); }