C# Класс WikiFunctions.WikiDiff

This class renders MediaWiki-like HTML diffs
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
DiffHead ( ) : string

Returns style header, from style.css file if present, else default style

GetDiff ( string leftText, string rightText, int contextLines ) : string

Renders diff

ResetCustomStyles ( ) : void
UndoAddition ( int right ) : string
UndoChange ( int left, int right ) : string
UndoDeletion ( int left, int right ) : string

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

Метод Описание
ContextHeader ( int left, int right ) : void
ContextLine ( int line ) : void

Renders a context row

LineAdded ( int line ) : void
LineChanged ( int leftLine, int rightLine ) : void
LineDeleted ( int left, int right ) : void
RenderContext ( Diff hunk ) : void
RenderDifference ( Diff hunk ) : void
WhitespaceDiff ( StringBuilder res, Word left, Word right ) : void
WordDiff ( StringBuilder res, Range range, Range otherRange, IList words, IList otherWords ) : void

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

DiffHead() публичный статический метод

Returns style header, from style.css file if present, else default style
public static DiffHead ( ) : string
Результат string

GetDiff() публичный метод

Renders diff
public GetDiff ( string leftText, string rightText, int contextLines ) : string
leftText string Earlier version of the text
rightText string Later version of the text
contextLines int Number of unchanged lines to show around changed ones
Результат string

ResetCustomStyles() публичный статический метод

public static ResetCustomStyles ( ) : void
Результат void

UndoAddition() публичный метод

public UndoAddition ( int right ) : string
right int
Результат string

UndoChange() публичный метод

public UndoChange ( int left, int right ) : string
left int
right int
Результат string

UndoDeletion() публичный метод

public UndoDeletion ( int left, int right ) : string
left int
right int
Результат string