Comparer
Custom logic for performing comparisons
Assembly: ServiceStack.dll
View Source
Declaration
public static class Comparer
Methods
TryCompare(IComparable, IComparable, out Int32)
Tries to compare the two objects.
View Source
Declaration
public static bool TryCompare(IComparable value, IComparable valueToCompare, out int result)
Returns
System.Boolean
: True if all went well, otherwise False.
Parameters
Type | Name | Description |
---|---|---|
System.IComparable | value |
|
| System.IComparable
| valueToCompare |
|
| System.Int32
| result | The resulting comparison value.
|
GetComparisonResult(IComparable, IComparable)
Tries to compare the two objects, but will throw an exception if it fails.
View Source
Declaration
public static int GetComparisonResult(IComparable value, IComparable valueToCompare)
Returns
System.Int32
: True on success, otherwise False.
Parameters
Type | Name |
---|---|
System.IComparable | value |
System.IComparable | valueToCompare |
GetEqualsResult(IComparable, IComparable)
Tries to compare the two objects, but will throw an exception if it fails.
View Source
Declaration
public static bool GetEqualsResult(IComparable value, IComparable valueToCompare)
Returns
System.Boolean
: True on success, otherwise False.
Parameters
Type | Name |
---|---|
System.IComparable | value |
System.IComparable | valueToCompare |