Class Pager
Process access to a console pager, which supports scrolling and search.
This is done by piping into less
command (Linux/macOS only.)
Windows is currently not supported.
Inheritance
System.Object
Pager
Implements
System.IDisposable
Namespace: McMaster.Extensions.CommandLineUtils
Assembly: McMaster.Extensions.CommandLineUtils.dll
Syntax
public class Pager : IDisposable
Constructors
| Improve this Doc View SourcePager()
Initializes a new instance of Pager which displays output in a console pager.
Declaration
public Pager()
Pager(IConsole)
Initializes a new instance of Pager which displays output in a console pager.
Declaration
public Pager(IConsole console)
Parameters
Type | Name | Description |
---|---|---|
IConsole | console | The console to write to. |
Properties
| Improve this Doc View SourcePrompt
The prompt to display at the bottom of the pager. https://www.computerhope.com/unix/uless.htm#Prompts for details.
Declaration
public string Prompt { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Writer
Gets an object which can be used to write text into the pager.
This fallsback to Out if the pager is not available.
Declaration
public TextWriter Writer { get; }
Property Value
Type | Description |
---|---|
System.IO.TextWriter |
Methods
| Improve this Doc View SourceDispose()
This will wait until the user exits the pager.
Declaration
public void Dispose()
Kill()
Force close the pager.
Declaration
public void Kill()
WaitForExit()
This will wait until the user exits the pager.
Declaration
public void WaitForExit()
Implements
System.IDisposable