AsOutputKind(this IObservable <string> source, OutputOrErrorKind kind) => from line in source ?? throw new ArgumentNullException(nameof(source)) select new OutputOrErrorLine(kind, line);
Filter(this IObservable <OutputOrErrorLine> source, OutputOrErrorKind kind) => from line in source ?? throw new ArgumentNullException(nameof(source)) where line.Kind == kind select line.Value;
public static void Deconstruct <TLine>(this TLine line, out OutputOrErrorKind kind, out string value) where TLine : IOutputOrErrorLine => (kind, value) = line is null ? throw new ArgumentNullException(nameof(line))