C# Class NetIde.Core.ToolWindows.DiffViewer.Text

Inheritance: NGit.Diff.Sequence
显示文件 Open project: netide/netide Class Usage Examples

Public Methods

Method Description
IsMissingNewlineAtEnd ( ) : bool

Determine if the file ends with a LF ('\n').

Determine if the file ends with a LF ('\n').

Size ( ) : int
Text ( string input ) : System

Create a new sequence from an existing content char array.

Create a new sequence from an existing content char array.

The entire array (indexes 0 through length-1) is used as the content.

WriteLine ( StringBuilder @out, int i ) : void

Write a specific line to the output stream, without its trailing LF.

Write a specific line to the output stream, without its trailing LF.

The specified line is copied as-is, with no character encoding translation performed.

If the specified line ends with an LF ('\n'), the LF is not copied. It is up to the caller to write the LF, if desired, between output lines.

Private Methods

Method Description
GetEnd ( int i ) : int
GetStart ( int i ) : int
LineMap ( int ptr, int end ) : NGit.Util.IntList
Next ( int ptr, char chrA ) : int
NextLF ( int ptr ) : int

Method Details

IsMissingNewlineAtEnd() public method

Determine if the file ends with a LF ('\n').
Determine if the file ends with a LF ('\n').
public IsMissingNewlineAtEnd ( ) : bool
return bool

Size() public method

public Size ( ) : int
return int

Text() public method

Create a new sequence from an existing content char array.
Create a new sequence from an existing content char array.

The entire array (indexes 0 through length-1) is used as the content.

public Text ( string input ) : System
input string /// the content array. The array is never modified, so passing /// through cached arrays is safe. ///
return System

WriteLine() public method

Write a specific line to the output stream, without its trailing LF.
Write a specific line to the output stream, without its trailing LF.

The specified line is copied as-is, with no character encoding translation performed.

If the specified line ends with an LF ('\n'), the LF is not copied. It is up to the caller to write the LF, if desired, between output lines.

the stream write operation failed.
public WriteLine ( StringBuilder @out, int i ) : void
@out StringBuilder
i int /// index of the line to extract. Note this is 0-based, so line /// number 1 is actually index 0. ///
return void