Example #1
0
        private static async Task RunAsync(ConsoleOptions options)
        {
            var config = new LineProcessingConfiguration(options.Format)
            {
                MinLineLength    = options.MinLength,
                IgnoreEmptyLines = options.IgnoreEmptyLines,
                TrimLines        = options.Trim
            };

            var flow = new FormatLinesFlow(config);

            using var reader = GetLineReader(options);

            await using var writer = GetLineWriter(options);

            await flow.RunAsync(reader, writer);
        }
Example #2
0
 public FormatLinesFlow(LineProcessingConfiguration configuration)
 {
     _patcher = LineProcessorBuilder.Build(configuration);
 }