// https://github.com/mattj23/InteractiveReadLine #nullable disable namespace InteractiveReadLine { public static class ExtensionMethods { /// /// Interactively read a line of text from the provider, using a specified configuration if one is /// given as an optional argument. /// /// the IReadLineProvider provider which will perform the interaction with the user (for /// example, the ConsoleReadLine object which wraps System.Console) /// The configuration to use for this specific interaction /// the text read from the user public static string ReadLine(this IReadLineProvider provider, ReadLineConfig config=null) { using (provider) { var handler = new ReadLineHandler(provider, config); return handler.ReadLine(); } } } }