INNER CODE UNIT · C#

baseRef

Nonanti/PipeFlow · samples/PipeFlow.Sandbox/Program.cs:516

    IPipelineSource<object?> baseRef = derived; // compiles only if out T works
    return baseRef is not null;
});

await runner.RunAsync("6.4 implement IPipelineSink<DataRow> that collects rows, drive from source", async () =>
{
    var source = new InMemoryDataRowSource(new[]
    {
        new DataRow { ["Id"] = 1 },
        new DataRow { ["Id"] = 2 },
        new DataRow { ["Id"] = 3 },
    });
    var sink = new CollectingSink();
    await sink.WriteAsync(source.ReadAsync());
    return sink.Received.Count == 3
        && sink.Received.Select(r => (int)r["Id"]!).SequenceEqual(new[] { 1, 2, 3 });
});

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…