in tool/TeamCity.Docker/StreamService.cs [57:78]
public void ProcessLines(Stream source, Action<string> handler)
{
if (source == null)
{
throw new ArgumentNullException(nameof(source));
}
if (handler == null)
{
throw new ArgumentNullException(nameof(handler));
}
using var streamReader = new StreamReader(source, Encoding.UTF8);
do
{
var line = streamReader.ReadLine();
if (line != null)
{
handler(line);
}
} while (!streamReader.EndOfStream);
}