TrafficAnalyzer: fix for empty payloads and file output
This commit is contained in:
parent
86ad11723b
commit
4a4fd0033d
1 changed files with 2 additions and 4 deletions
|
@ -10,7 +10,7 @@ internal static class Program
|
|||
private const string ProtoNamespace = "Protocol";
|
||||
private const string MessageParserProperty = "Parser";
|
||||
|
||||
private static readonly DumpOptions s_objectDumperOpts = new() { DumpStyle = DumpStyle.CSharp, IndentSize = 4, IndentChar = ' ' };
|
||||
private static readonly DumpOptions s_objectDumperOpts = new() { DumpStyle = DumpStyle.CSharp, IndentSize = 4, IndentChar = ' ', IgnoreDefaultValues = true };
|
||||
|
||||
private static void Main(string[] args)
|
||||
{
|
||||
|
@ -21,7 +21,7 @@ internal static class Program
|
|||
string? idInput;
|
||||
string? payloadInput;
|
||||
|
||||
while (!string.IsNullOrEmpty(idInput = Console.ReadLine()) && !string.IsNullOrEmpty(payloadInput = Console.ReadLine()))
|
||||
while (!string.IsNullOrEmpty(idInput = Console.ReadLine()) && (payloadInput = Console.ReadLine()) != null)
|
||||
{
|
||||
int messageId = int.Parse(idInput);
|
||||
byte[] payload = Convert.FromHexString(payloadInput);
|
||||
|
@ -29,8 +29,6 @@ internal static class Program
|
|||
inList.Add(Tuple.Create(messageId, payload));
|
||||
}
|
||||
|
||||
Console.Clear();
|
||||
|
||||
foreach ((int messageId, byte[] payload) in inList)
|
||||
{
|
||||
string messageName = ((MessageId)messageId).ToString();
|
||||
|
|
Loading…
Reference in a new issue