Skip to content

Commit 268a932

Browse files
committed
Merge branch 'main' of https://github.com/igece/ObjDiff
2 parents 5403012 + 2dee9d5 commit 268a932

1 file changed

Lines changed: 17 additions & 3 deletions

File tree

README.md

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
[![nuget](https://img.shields.io/nuget/v/ObjDiff.svg)](https://www.nuget.org/packages/ObjDiff)
44
[![nuget](https://img.shields.io/nuget/dt/ObjDiff.svg)](https://www.nuget.org/packages/ObjDiff)
55
[![Build](https://github.com/igece/ObjDiff/actions/workflows/CI_build.yml/badge.svg)](https://github.com/igece/ObjDiff/actions/workflows/CI_build.yml)
6-
[![Tests](https://github.com/igece/ObjDiff/actions/workflows/CI_Tests.yml/badge.svg)](https://github.com/igece/ObjDiff/actions/workflows/CI_Tests.yml)
6+
[![Unit Tests](https://github.com/igece/ObjDiff/actions/workflows/CI_Tests.yml/badge.svg)](https://github.com/igece/ObjDiff/actions/workflows/CI_Tests.yml)
77

88
A C# .NET Standard library that allows to obtain the differences between two objects using reflection.
99

@@ -128,11 +128,25 @@ Assert.Equal(object1, object2);
128128
Both `Diff` and `Patch` operations can be executed through a simple call:
129129

130130
``` csharp
131-
ObjDiff.MakeEqual(object1, object2);
131+
ObjDiff.MakeEqual(object1, object2, compareOptions);
132132
```
133133

134134
Or using `MakeEqualTo` extension method:
135135

136136
``` csharp
137-
object1.MakeEqualTo(object2);
137+
object1.MakeEqualTo(object2, compareOptions);
138+
```
139+
140+
### Checking Equality
141+
142+
The library also offers a method to easily check that two objects are equal (attending to ObjDiff rules):
143+
144+
``` csharp
145+
ObjDiff.AreEqual(object1, object2, compareOptions);
146+
```
147+
148+
Or using `IsEqualTo` extension method:
149+
150+
``` csharp
151+
object1.IsEqualTo(object2, compareOptions);
138152
```

0 commit comments

Comments
 (0)