private static bool OnReportStatus(ByteArray byteArray, IUpdaterReportClientService clientService) { UpdaterState status = new UpdaterState(); status.ReadFromByteArray(byteArray); int crc = byteArray.readIntNCRC(); if (crc == byteArray.CRC) { clientService.OnReportStatus(ref status); } byteArray.Recycle(); return(true); }
private static string ParseReportStatus(ByteArray byteArray) { StringBuilder sb = new StringBuilder(); sb.Append("ReportStatus("); sb.Append("status : UpdaterState"); sb.Append(")\r\n{\r\n"); int crc = byteArray.readIntNCRC(); // parse global seq UpdaterState status = new UpdaterState(); status.ReadFromByteArray(byteArray); sb.AppendFormat(@"status = ""{0}""", status); sb.Append("}"); return(sb.ToString()); }