C# Class System.TermInfo.Database

Provides a terminfo database.
显示文件 Open project: dotnet/corefx Class Usage Examples

Private Properties

Property Type Description
Database System.Collections.Generic
FindNullTerminator int
ParseExtendedStrings string>.Dictionary
ReadActiveDatabase Database
ReadDatabase Database
ReadDatabase Database
ReadInt16 short
ReadString string
RoundUpToEven int
TryOpen bool

Public Methods

Method Description
GetExtendedString ( string name ) : string

Gets a string from the extended strings section.

GetNumber ( WellKnownNumbers numberIndex ) : int

Gets a number from the numbers section by the number's well-known index.

GetString ( WellKnownStrings stringTableIndex ) : string

Gets a string from the strings section by the string's well-known index.

Private Methods

Method Description
Database ( string term, byte data ) : System.Collections.Generic

Initializes the database instance.

FindNullTerminator ( byte buffer, int pos ) : int

Finds the null-terminator for a string that begins at the specified position.

ParseExtendedStrings ( byte data, int extendedBeginning ) : string>.Dictionary

Parses the extended string information from the terminfo data.

ReadActiveDatabase ( ) : Database

Read the database for the current terminal as specified by the "TERM" environment variable.

ReadDatabase ( string term ) : Database

Read the database for the specified terminal.

ReadDatabase ( string term, string directoryPath ) : Database

Read the database for the specified terminal from the specified directory.

ReadInt16 ( byte buffer, int pos ) : short

Read a 16-bit value from the buffer starting at the specified position.

ReadString ( byte buffer, int pos ) : string

Reads a string from the buffer starting at the specified position.

RoundUpToEven ( int i ) : int
TryOpen ( string filePath, SafeFileHandle &fd ) : bool

Attempt to open as readonly the specified file path.

Method Details

GetExtendedString() public method

Gets a string from the extended strings section.
public GetExtendedString ( string name ) : string
name string The name of the string as contained in the extended names section.
return string

GetNumber() public method

Gets a number from the numbers section by the number's well-known index.
public GetNumber ( WellKnownNumbers numberIndex ) : int
numberIndex WellKnownNumbers The index of the string to find.
return int

GetString() public method

Gets a string from the strings section by the string's well-known index.
public GetString ( WellKnownStrings stringTableIndex ) : string
stringTableIndex WellKnownStrings The index of the string to find.
return string