public void OnNotificationStateChanged(ProcessTrace processTrace, StepNotificationState notificationStateItem) { notificationStateItem.ThrowIfNull(nameof(notificationStateItem)); _processTrace = processTrace; if (NotificationsViewModelData.NotificationStatus != NotificationStatus.InProgress) { NotificationsViewModelData.NotificationStatus = NotificationStatus.InProgress; } if (!string.IsNullOrWhiteSpace(notificationStateItem.LowLevelInstructionsMessage)) { NotificationsViewModelData.ProcessStatusMessage = notificationStateItem.LowLevelInstructionsMessage; } else { NotificationsViewModelData.ProcessStatusMessage = notificationStateItem.ToString(); } }
public void OnNotificationStateChanged(ProcessTrace processTrace, StepNotificationState notificationStateItem) { notificationStateItem.ThrowIfNull(nameof(notificationStateItem)); lock (CLIConsts.ConsolWriteSync) { ClearConsoleLine(3); int cursorTopStart = _console.CursorTop; _console.ForegroundColor = ConsoleColor.DarkGray; _console.SetCursorPosition(3, _console.CursorTop); _console.Out.Write(notificationStateItem.ToString()); int cursorTopEnd = _console.CursorTop; numberOfLineForLastMessage = cursorTopEnd - cursorTopStart + 1; _console.ForegroundColor = ConsoleColor.White; } }