private static bool OnListDirectorysResult(ByteArray byteArray, IFileClientService clientService) { int result = byteArray.readDynamicsInt(); StringSequence directories = new StringSequence(); directories.ReadFromByteArray(byteArray); int crc = byteArray.readIntNCRC(); if (crc == byteArray.CRC) { clientService.OnListDirectorysResult(result, ref directories); } byteArray.Recycle(); return(true); }
private static string ParseListDirectorysResult(ByteArray byteArray) { StringBuilder sb = new StringBuilder(); sb.Append("ListDirectorysResult("); sb.Append("result : int,"); sb.Append("directories : StringSequence"); sb.Append(")\r\n{\r\n"); int crc = byteArray.readIntNCRC(); // parse global seq int result = byteArray.readDynamicsInt(); StringSequence directories = new StringSequence(); directories.ReadFromByteArray(byteArray); sb.AppendFormat(@"result = ""{0}""", result); sb.Append(",\r\n"); sb.AppendFormat(@"directories = ""{0}""", directories); sb.Append("}"); return(sb.ToString()); }