diff --git a/TrafficAnalyzer/Program.cs b/TrafficAnalyzer/Program.cs index aa4705d..0496a0e 100644 --- a/TrafficAnalyzer/Program.cs +++ b/TrafficAnalyzer/Program.cs @@ -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();