Search Results for

    Show / Hide Table of Contents

    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 Source

    Pager()

    Initializes a new instance of Pager which displays output in a console pager.

    Declaration
    public Pager()
    | Improve this Doc View Source

    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 Source

    Prompt

    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
    | Improve this Doc View Source

    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 Source

    Dispose()

    This will wait until the user exits the pager.

    Declaration
    public void Dispose()
    | Improve this Doc View Source

    Kill()

    Force close the pager.

    Declaration
    public void Kill()
    | Improve this Doc View Source

    WaitForExit()

    This will wait until the user exits the pager.

    Declaration
    public void WaitForExit()

    Implements

    System.IDisposable
    • Improve this Doc
    • View Source
    In This Article
    Back to top