C# Class FluentValidation.Internal.Comparer

Custom logic for performing comparisons
Afficher le fichier Open project: JeremySkinner/FluentValidation

Méthodes publiques

Méthode Description
GetComparisonResult ( IComparable value, IComparable valueToCompare ) : int

Tries to compare the two objects, but will throw an exception if it fails.

GetEqualsResult ( IComparable value, IComparable valueToCompare ) : bool

Tries to compare the two objects, but will throw an exception if it fails.

TryCompare ( IComparable value, IComparable valueToCompare, int &result ) : bool

Tries to compare the two objects.

Private Methods

Méthode Description
Compare ( IComparable value, IComparable valueToCompare, int &result ) : void

Tries to do a proper comparison but may fail. First it tries the default comparison, if this fails, it will see if the values are fractions. If they are, then it does a double comparison, otherwise it does a long comparison.

Method Details

GetComparisonResult() public static méthode

Tries to compare the two objects, but will throw an exception if it fails.
public static GetComparisonResult ( IComparable value, IComparable valueToCompare ) : int
value IComparable
valueToCompare IComparable
Résultat int

GetEqualsResult() public static méthode

Tries to compare the two objects, but will throw an exception if it fails.
public static GetEqualsResult ( IComparable value, IComparable valueToCompare ) : bool
value IComparable
valueToCompare IComparable
Résultat bool

TryCompare() public static méthode

Tries to compare the two objects.
public static TryCompare ( IComparable value, IComparable valueToCompare, int &result ) : bool
value IComparable
valueToCompare IComparable
result int The resulting comparison value.
Résultat bool