/// <summary> /// Overridden to displays the content in the desired format /// </summary> /// <returns>String representing confirm migration status in desired format</returns> public override string ToString() { StringBuilder consoleop = new StringBuilder(); if (null != ConfirmStatus && 0 < ConfirmStatus.Count) { if (MigrationVolumeContainerConfirmStatus.CommitOrRollbackNotStarted == Status) { List <string> volumeContainerNameList = ConfirmStatus.Select(dc => dc.CloudConfigurationName).ToList(); consoleop.AppendLine("CloudConfigurationName(s) : " + ConcatStringList(volumeContainerNameList)); } else { ConfirmStatus.Sort(CompareConfirmStatus); foreach (var status in ConfirmStatus) { int maxLength = status.GetType().GetProperties().ToList().Max(t => t.Name.Length); consoleop.AppendLine( IntendAndConCat("CloudConfigurationName", status.CloudConfigurationName, maxLength)); consoleop.AppendLine( IntendAndConCat("Operation", status.Operation, maxLength)); consoleop.AppendLine( IntendAndConCat("PercentageCompleted", status.PercentageCompleted, maxLength)); if (null != status.StatusMessage && 0 < status.StatusMessage.Count) { consoleop.AppendLine( IntendAndConCat("Messages", string.Empty, maxLength)); foreach (var msgInfo in status.StatusMessage) { string consoleStrOp = HcsMessageInfoToString(msgInfo); if (!string.IsNullOrEmpty(consoleStrOp)) { consoleop.AppendLine("\t"); consoleop.Append(consoleStrOp); } } } consoleop.AppendLine(); } } } else { consoleop.Append("None"); } return(consoleop.ToString()); }
private SendMqttMessage Enqueue(IChannel channel, int messageId, string topic, byte[] datas, int mqttQoS, ConfirmStatus confirmStatus) { var message = new SendMqttMessage { ByteBuf = datas, Channel = channel, MessageId = messageId, Qos = mqttQoS, Time = DateTime.Now.Ticks / 10000, ConfirmStatus = confirmStatus, Topic = topic }; _scanRunnable.Enqueue(message); return(message); }
public ViewApplications(int id) { ID = id; controllerObj = new Controller(); InitializeComponent(); if (ID == -1) { button_ViewCit.Hide(); label6.Visible = true; ChangePrice.Visible = true; ConfirmPrice.Visible = true; } else { Delete.Hide(); Add.Hide(); ConfirmStatus.Hide(); label5.Hide(); ChangeStatus.Hide(); } }