Table of Contents

Class ComparisonKindsExtensions

Namespace
Garyon.Objects
Assembly
Garyon.dll

Contains extensions for the ComparisonKinds enum.

public static class ComparisonKindsExtensions
Inheritance
ComparisonKindsExtensions
Inherited Members

Methods

AsResult(ComparisonKinds)

Converts the given comparison kind into a ComparisonResult value.

public static ComparisonResult AsResult(this ComparisonKinds kind)

Parameters

kind ComparisonKinds

The single comparison kind that should be

Returns

ComparisonResult

The respective ComparisonResult value.

Exceptions

ArgumentException

Thrown if kind does not represent exactly a single comparison kind.

HasKinds(ComparisonKinds, ComparisonKinds)

Determines whether a ComparisonKinds value contains the given kinds.

public static bool HasKinds(this ComparisonKinds kinds, ComparisonKinds other)

Parameters

kinds ComparisonKinds

The kinds value to determine if it contains the requested kinds.

other ComparisonKinds

The requested comparison kinds to check if they are contained in the given ComparisonKinds value.

Returns

bool

true if kinds contains at least all of the requested kinds in other, otherwise false.

Matches(ComparisonKinds, ComparisonResult)

Determines whether a ComparisonKinds contains a comparison kind that matches the given ComparisonResult.

public static bool Matches(this ComparisonKinds kinds, ComparisonResult result)

Parameters

kinds ComparisonKinds

The comparison kinds to determine whether they are satisfied by the result.

result ComparisonResult

The

Returns

bool

true if there is at least one comparison kind in kinds that was matched by the result, otherwise false.