C# Класс GitSharp.Core.Diff.DiffFormatter

Format an EditList as a Git style unified patch script.
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
DiffFormatter ( ) : System

Create a new formatter with a default level of context.

format ( Stream @out, FileHeader head, RawText a, RawText b ) : void

Format a patch script, reusing a previously parsed FileHeader. This formatter is primarily useful for editing an existing patch script to increase or reduce the number of lines of context within the script. All header lines are reused as-is from the supplied FileHeader.

setContext ( int lineCount ) : void

Change the number of lines of context to display.

Приватные методы

Метод Описание
CombineA ( IList e, int i ) : bool
CombineB ( IList e, int i ) : bool
End ( Edit edit, int a, int b ) : bool
FindCombinedEnd ( IList edits, int i ) : int
FormatEdits ( Stream @out, RawText a, RawText b, EditList edits ) : void
WriteHunkHeader ( Stream @out, int aCur, int aEnd, int bCur, int bEnd ) : void
WriteInteger ( Stream @out, int count ) : void
WriteLine ( Stream @out, char prefix, RawText text, int cur ) : void
WriteRange ( Stream @out, char prefix, int begin, int cnt ) : void

Описание методов

DiffFormatter() публичный Метод

Create a new formatter with a default level of context.
public DiffFormatter ( ) : System
Результат System

format() публичный Метод

Format a patch script, reusing a previously parsed FileHeader. This formatter is primarily useful for editing an existing patch script to increase or reduce the number of lines of context within the script. All header lines are reused as-is from the supplied FileHeader.
public format ( Stream @out, FileHeader head, RawText a, RawText b ) : void
@out Stream
head GitSharp.Core.Patch.FileHeader existing file header containing the header lines to copy.
a RawText /// Text source for the pre-image version of the content. /// This must match the content of . ///
b RawText writing to the supplied stream failed.
Результат void

setContext() публичный Метод

Change the number of lines of context to display.
public setContext ( int lineCount ) : void
lineCount int /// Number of lines of context to see before the first /// modification and After the last modification within a hunk of /// the modified file. ///
Результат void