Skip to content

Commit 4809555

Browse files
committed
Rename namespace and class in README
1 parent eadbac7 commit 4809555

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

README.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,14 @@ Diffract is a .NET library that displays a readable diff between two objects. It
1818
Here is an example:
1919

2020
```csharp
21+
using DEdge.Diffract;
22+
2123
record User(string Name, int Age, string[] Pets);
2224

2325
var expected = new User("Emma", 42, new[] { "Oscar", "Fluffy", "Tibbles" });
2426
var actual = new User("Andy", 42, new[] { "Oscar", "Sparky" });
2527

26-
Diffract.Assert(expected, actual);
28+
Differ.Assert(expected, actual);
2729
```
2830

2931
The above throws an `AssertionFailedException` with the following message:
@@ -145,28 +147,28 @@ Value dictionary differs:
145147

146148
## API
147149

148-
Diffract provides the following methods:
150+
Diffract lives in the namespace `DEdge.Diffract`. Its main API is the class `Differ`, which provides the following methods:
149151

150152
```csharp
151-
void Diffract.Assert<T>(T expected, T actual, IDiffer<T> differ = null, PrintParams param = null)
153+
void Assert<T>(T expected, T actual, IDiffer<T> differ = null, PrintParams param = null)
152154
```
153155

154156
Computes the diff between two objects and, if it is not empty, throws an `AssertionFailedException` with the diff as message.
155157

156158
```csharp
157-
string Diffract.ToString<T>(T expected, T actual, IDiffer<T> differ = null, PrintParams param = null)
159+
string ToString<T>(T expected, T actual, IDiffer<T> differ = null, PrintParams param = null)
158160
```
159161

160162
Prints the diff between two objects to a string.
161163

162164
```csharp
163-
void Diffract.Write<T>(T expected, T actual, TextWriter writer = null, IDiffer<T> differ = null, PrintParams param = null)
165+
void Write<T>(T expected, T actual, TextWriter writer = null, IDiffer<T> differ = null, PrintParams param = null)
164166
```
165167

166168
Prints the diff between two objects to the given TextWriter (or to standard output if not provided).
167169

168170
```csharp
169-
FSharpOption<Diff> Diffract.Diff<T>(T expected, T actual, IDiffer<T> differ = null)
171+
FSharpOption<Diff> Diff<T>(T expected, T actual, IDiffer<T> differ = null)
170172
```
171173

172174
Computes the diff between two objects. Returns `None` if the objects are found to be equal.

0 commit comments

Comments
 (0)