Namespaces

Types in GitSharp

Type Text

Namespace GitSharp

Represents a line-based text (delimited with standard line delimiters such as CR and/or LF) and allows access of lines by 1-based line number. Text holds a byte array internally which is used for the diff algorithms which work on byte level.

Note: The first line number in the text is 1.

Methods

Properties

Public instance methods

string GetBlock(int start_line, int end_line)

string GetLine(int line)

Byte[] GetRawBlock(int start_line, int end_line)

Get a text block by lines as encoded byte array. The text block starts with begin of start_line and ends with start of end_line.

Note: The first line number in the text is 1
Parameters
int start_line

1-based line number marking the start of the text block at the start of the specified line

int end_line

1-based line number markign the end of the text block at the start of the specified line

Byte[] GetRawLine(int line)

Returns a line of the text as encoded byte array.

Note: The first line number in the text is 1
Parameters
int line

1-based line number

Public properties

Encoding Encoding get; set;

int Length get;

int NumberOfLines get;

Byte[] RawContent get;

int RawLength get;