Skip to content

About

Simple open source objects compare library

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

 

History

10 Commits

Folders and files

Repository files navigation

What is Statics.Compare?

Is a simple open source objects compare library

Overview

Compares members of two objects and evaluates if they are equal or none equal based on conventions (public properties with the same names and same/derived/convertible types). Provides also few tweak options

You can install it via package manager console

PM> Install-Package Statics.Compare

Basic usage

using static Statics.Compare.Members;

var equals = CompareEquals(left, right);

Default compare options

  • StringComparison memberNameComparison = StringComparison.OrdinalIgnoreCase,
  • bool evaluateChildNodes = false,
  • bool ignoreDefaultLeftValues = false,
  • bool ignoreDefaultRightValues = false,
  • bool useConvert = false

Differences can be listed by using parameter memberDiffs:

var equals = CompareEquals(
  leftEntries, 
  rightEntries, 
  out IEnumerable<MemberDiff> memberDiffs, 
  evaluateChildNodes: true);

About

Simple open source objects compare library

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages