Checkpoint: Lazy by Observation
Challenge on lesson: Checkpoint โ The Data Processing Pipeline
Implement the pipeline described in the checkpoint. Level names: DEBUG=0, INFO=1, WARN=2, ERROR=3.
``csharp
static IEnumerable<(int Level, string Msg)> ParseLines(IEnumerable<string> lines);
static IEnumerable<(int Level, string Msg)> FilterLevel(IEnumerable<(int Level, string Msg)> src, int minLevel);
static IEnumerable<string> Format(IEnumerable<(int Level, string Msg)> src);
public sealed class CountingSource : IEnumerable<string>
{
public CountingSource(params string[] lines);
public int ReadCount { get; } // lines actually pulled by consumers
}
static List<string> Run(IEnumerable<string> lines, int minLevel, int maxResults);
``
Back to lesson: Checkpoint โ The Data Processing Pipeline