Skip to content

Commit

Permalink
Fix registration of dateOnly and TimeOnly comparators
Browse files Browse the repository at this point in the history
  • Loading branch information
sergeylopatyuk committed Sep 4, 2023
1 parent 7fdb886 commit ff9455c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Compare-NET-Objects/RootComparerFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,14 @@ private static RootComparer BuildRootComparer()
_rootComparer.TypeComparers.Add(new DateTimeOffSetComparer(_rootComparer));
_rootComparer.TypeComparers.Add(new TimespanComparer(_rootComparer));
_rootComparer.TypeComparers.Add(new EnumComparer(_rootComparer));
_rootComparer.TypeComparers.Add(new StructComparer(_rootComparer));


#if NET6_0_OR_GREATER
_rootComparer.TypeComparers.Add(new DateOnlyComparer(_rootComparer));
_rootComparer.TypeComparers.Add(new TimeOnlyComparer(_rootComparer));
#endif

_rootComparer.TypeComparers.Add(new StructComparer(_rootComparer));

return _rootComparer;
}
#endregion
Expand Down

0 comments on commit ff9455c

Please sign in to comment.