C# Class JustAProgrammer.ADPR.ADPRRawUserInterface

A sample implementation of the PSHostRawUserInterface for console applications. Members of this class that easily map to the .NET console class are implemented. More complex methods are not implemented and throw a NotImplementedException exception.
Based on the msdn page Writing a Windows PowerShell Host Application
Inheritance: System.Management.Automation.Host.PSHostRawUserInterface
Show file Open project: zippy1981/AppDomainPoshRunner

Public Methods

Method Description
FlushInputBuffer ( ) : void

This API resets the input buffer. In this example this functionality is not needed so the method returns nothing.

GetBufferContents ( System.Management.Automation.Host.Rectangle rectangle ) : ].BufferCell[

This API returns a rectangular region of the screen buffer. In this example this functionality is not needed so the method throws a NotImplementException exception.

ReadKey ( ReadKeyOptions options ) : System.Management.Automation.Host.KeyInfo

This API reads a pressed, released, or pressed and released keystroke from the keyboard device, blocking processing until a keystroke is typed that matches the specified keystroke options.

ScrollBufferContents ( System.Management.Automation.Host.Rectangle source, System.Management.Automation.Host.Coordinates destination, System.Management.Automation.Host.Rectangle clip, System.Management.Automation.Host.BufferCell fill ) : void
SetBufferContents ( System.Management.Automation.Host.Coordinates origin, System.Management.Automation.Host.BufferCell contents ) : void
SetBufferContents ( System.Management.Automation.Host.Rectangle rectangle, System.Management.Automation.Host.BufferCell fill ) : void

Method Details

FlushInputBuffer() public method

This API resets the input buffer. In this example this functionality is not needed so the method returns nothing.
public FlushInputBuffer ( ) : void
return void

GetBufferContents() public method

This API returns a rectangular region of the screen buffer. In this example this functionality is not needed so the method throws a NotImplementException exception.
public GetBufferContents ( System.Management.Automation.Host.Rectangle rectangle ) : ].BufferCell[
rectangle System.Management.Automation.Host.Rectangle Defines the size of the rectangle.
return ].BufferCell[

ReadKey() public method

This API reads a pressed, released, or pressed and released keystroke from the keyboard device, blocking processing until a keystroke is typed that matches the specified keystroke options.
public ReadKey ( ReadKeyOptions options ) : System.Management.Automation.Host.KeyInfo
options ReadKeyOptions Options, such as IncludeKeyDown, used when /// reading the keyboard.
return System.Management.Automation.Host.KeyInfo

ScrollBufferContents() public method

public ScrollBufferContents ( System.Management.Automation.Host.Rectangle source, System.Management.Automation.Host.Coordinates destination, System.Management.Automation.Host.Rectangle clip, System.Management.Automation.Host.BufferCell fill ) : void
source System.Management.Automation.Host.Rectangle
destination System.Management.Automation.Host.Coordinates
clip System.Management.Automation.Host.Rectangle
fill System.Management.Automation.Host.BufferCell
return void

SetBufferContents() public method

public SetBufferContents ( System.Management.Automation.Host.Coordinates origin, System.Management.Automation.Host.BufferCell contents ) : void
origin System.Management.Automation.Host.Coordinates
contents System.Management.Automation.Host.BufferCell
return void

SetBufferContents() public method

public SetBufferContents ( System.Management.Automation.Host.Rectangle rectangle, System.Management.Automation.Host.BufferCell fill ) : void
rectangle System.Management.Automation.Host.Rectangle
fill System.Management.Automation.Host.BufferCell
return void