static void Wain(string[] args) { var arg = args.Length > 0 ? args[0] : throw new Exception("Missing file specification."); if (IsZipFile(arg)) { foreach (var e in Saz.ReadCorrelated(arg, (reqn, req, rspn, rsp) => new { Request = new { FullName = reqn, Message = (HttpMessage)req }, Response = new { FullName = rspn, Message = (HttpMessage)rsp }, })) { foreach (var r in new[] { e.Request, e.Response }) { Console.WriteLine($":{r.FullName}"); Console.WriteLine(); Dump(r.Message, Console.Out); Console.WriteLine(); } } } else { using var input = File.OpenRead(arg); using var message = HttpMessageReader.Read(input); Dump(message, Console.Error, Console.OpenStandardOutput()); } }