|
Joutsen v0.5.0+12-g5dd5f7e
|
An implementation of System.Collections.Generic.IEqualityComparer that uses reflection to check the public properties for equality. More...
Public Member Functions | |
| PropertiesEqualityComparer (params string[] ignoredProperties) | |
| Creates a new instance of Framework.System.Reflection.PropertiesEqualityComparer which will compare elements of System.Collections.IEnumerables also by their public properties. More... | |
| PropertiesEqualityComparer (SCG.IEqualityComparer< object > elementsComparer, params string[] ignoredProperties) | |
Creates a new instance of Framework.System.Reflection.PropertiesEqualityComparer which will use the elementsComparer to compare the elements of System.Collections.IEnumerables. More... | |
| new bool | Equals (object x, object y) |
| Determines whether the specified objects are equal by checking the public properties for equality. More... | |
| int | GetHashCode (object obj) |
| Returns a hash code for the specified object. More... | |
| Set< string > | GetDifferingProperties (object x, object y) |
| Fetches a set of names of properties which are not equal. More... | |
| bool | SameInstance (object x, object y) |
Protected Member Functions | |
| bool | IsEnumerable (PropertyInfo info) |
Checks if info describes an enumerable property. More... | |
| bool | AreElementsEqual (IEnumerable expected, IEnumerable actual) |
| Checks the elements of two instances of System.Collections.IEnumerable for equality. More... | |
Properties | |
| Set< string > | IgnoredProperties [get] |
| The names of the properties that are not compared when checking for equality. More... | |
An implementation of System.Collections.Generic.IEqualityComparer that uses reflection to check the public properties for equality.
| Joutsen.Reflection.PropertiesEqualityComparer.PropertiesEqualityComparer | ( | params string[] | ignoredProperties | ) |
Creates a new instance of Framework.System.Reflection.PropertiesEqualityComparer which will compare elements of System.Collections.IEnumerables also by their public properties.
| ignoredProperties | the names of the properties that are not taken into account when checking for equality |
| Joutsen.Reflection.PropertiesEqualityComparer.PropertiesEqualityComparer | ( | SCG.IEqualityComparer< object > | elementsComparer, |
| params string[] | ignoredProperties | ||
| ) |
Creates a new instance of Framework.System.Reflection.PropertiesEqualityComparer which will use the elementsComparer to compare the elements of System.Collections.IEnumerables.
| elementsComparer | the Framework.System.Reflection.PropertiesEqualityComparer that will be used to check if elements of properties of type System.Collections.IEnumerable are equal |
| ignoredProperties | the names of the properties that are not taken into account when checking for equality |
|
protected |
Checks the elements of two instances of System.Collections.IEnumerable for equality.
| expected | The first instance of System.Collections.IEnumerable. |
| actual | The second instance of System.Collections.IEnumerable. |
| new bool Joutsen.Reflection.PropertiesEqualityComparer.Equals | ( | object | x, |
| object | y | ||
| ) |
Determines whether the specified objects are equal by checking the public properties for equality.
| x | the first object to compare |
| y | the second object to compare |
| Set< string > Joutsen.Reflection.PropertiesEqualityComparer.GetDifferingProperties | ( | object | x, |
| object | y | ||
| ) |
Fetches a set of names of properties which are not equal.
| x | the first object to compare |
| y | the second object to compare |
| System.ArgumentNullException | if either x or y are null |
| int Joutsen.Reflection.PropertiesEqualityComparer.GetHashCode | ( | object | obj | ) |
Returns a hash code for the specified object.
| obj | the Object for which a hash code is to be returned. |
| System.ArgumentNullException | if obj is null |
|
protected |
Checks if info describes an enumerable property.
| info | the property info to check |
info describes an enumerable property, otherwise false | bool Joutsen.Reflection.PropertiesEqualityComparer.SameInstance | ( | object | x, |
| object | y | ||
| ) |
|
get |
The names of the properties that are not compared when checking for equality.