You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+41-1Lines changed: 41 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,10 +5,11 @@ DiffPlex is C# library to generate textual diffs. It targets `netstandard1.0+`.
5
5
6
6
# About the API
7
7
8
-
The DiffPlex library currently exposes two interfaces for generating diffs:
8
+
The DiffPlex library currently exposes several interfaces and classes for generating diffs:
9
9
10
10
*`IDiffer` (implemented by the `Differ` class) - This is the core diffing class. It exposes the low level functions to generate differences between texts.
11
11
*`ISidebySideDiffer` (implemented by the `SideBySideDiffer` class) - This is a higher level interface. It consumes the `IDiffer` interface and generates a `SideBySideDiffModel`. This is a model which is suited for displaying the differences of two pieces of text in a side by side view.
12
+
*`UnidiffRenderer` - A renderer class that generates unified diff (unidiff) format output compatible with Git, patch utilities, and other standard diff tools.
12
13
13
14
## Examples
14
15
@@ -24,6 +25,10 @@ For use of the `ISidebySideDiffer` interface see:
24
25
*`DiffController.cs` and associated MVC views in the `WebDiffer` project
25
26
*`TextBoxDiffRenderer.cs` in the `SilverlightDiffer` project
26
27
28
+
For use of the `UnidiffRenderer` class see:
29
+
30
+
*`Program.cs` in the `DiffPlex.ConsoleRunner` project
31
+
27
32
## Sample code
28
33
29
34
```csharp
@@ -133,6 +138,41 @@ Currently provided implementations:
133
138
-`LineEndingsPreservingChunker`
134
139
-`WordChunker`
135
140
141
+
## UnidiffRenderer Class
142
+
143
+
The `UnidiffRenderer` class provides functionality to generate unified diff (unidiff) format output, which is the standard format used by Git, patch utilities, and other diff tools.
0 commit comments