private PacketLogFile(Func<Stream> openStream) { _openStream = openStream; using (var stream = _openStream()) { var reader = new PacketLogReader(stream); Header = reader.Header; } }
private PacketLogFile(Func <Stream> openStream) { _openStream = openStream; using (var stream = _openStream()) { var reader = new PacketLogReader(stream); Header = reader.Header; } }
private static IEnumerable<Message> ReadMessages(Func<Stream> openStream) { using (var stream = openStream()) { var reader = new PacketLogReader(stream); Message message; while ((message = reader.ReadMessage()) != null) { yield return message; } } }
private static IEnumerable <Message> ReadMessages(Func <Stream> openStream) { using (var stream = openStream()) { var reader = new PacketLogReader(stream); Message message; while ((message = reader.ReadMessage()) != null) { yield return(message); } } }