Generated by DocFX

Class KeyValuePairComparer<TKey, TValue>

Vanilla key-based comparer for .

Inheritance
System.Object
KeyValuePairComparer<TKey, TValue>
Implements
IComparer<TKey>
Namespace: ISynergy.Framework.Core.Collections
Assembly: ISynergy.Framework.Core.dll
Syntax
public class KeyValuePairComparer<TKey, TValue> : Comparer<KeyValuePair<TKey, TValue>>
Type Parameters
Name Description
TKey

The key type in the key-value pair.

TValue

The value type in the key-value pair.

Constructors

View Source

KeyValuePairComparer()

Initializes a new instance of the KeyValuePairComparer<TKey, TValue> class.

Declaration
public KeyValuePairComparer()
View Source

KeyValuePairComparer(IComparer<TKey>)

Initializes a new instance of the KeyValuePairComparer<TKey, TValue> class.

Declaration
public KeyValuePairComparer(IComparer<TKey> keyComparer)
Parameters
Type Name Description
IComparer<TKey> keyComparer

The comparer to be used to compare keys.

Properties

View Source

Default

Returns a default sort order comparer for the key-value pair specified by the generic argument.

Declaration
public static KeyValuePairComparer<TKey, TValue> Default { get; }
Property Value
Type Description
KeyValuePairComparer<TKey, TValue>

Methods

View Source

Compare(TKey, TKey)

Compares two objects and returns a value indicating whether one is less than, equal to, or greater than the other.

Declaration
public int Compare(TKey x, TKey y)
Parameters
Type Name Description
TKey x

The first object to compare.

TKey y

The second object to compare.

Returns
Type Description
System.Int32
View Source

Compare(KeyValuePair<TKey, TValue>, KeyValuePair<TKey, TValue>)

Compares two objects and returns a value indicating whether one is less than, equal to, or greater than the other.

Declaration
public override int Compare(KeyValuePair<TKey, TValue> x, KeyValuePair<TKey, TValue> y)
Parameters
Type Name Description
KeyValuePair<TKey, TValue> x

The first object to compare.

KeyValuePair<TKey, TValue> y

The second object to compare.

Returns
Type Description
System.Int32

Implements

IComparer<>

Extension Methods

Matrix.Replace<T>(T, Object, Object)
Matrix.IsEqual(Object, Object, Decimal, Decimal)
EntityBaseExtensions.HasProperty(Object, String)
ArrayExtensions.Concatenate<T>(T, T[])
CollectionExtensions.FromHierarchy<TSource>(TSource, Func<TSource, TSource>, Func<TSource, Boolean>)
CollectionExtensions.FromHierarchy<TSource>(TSource, Func<TSource, TSource>)
ObjectExtensions.Clone<T>(T)
ObjectExtensions.To<T>(Object)
ObjectExtensions.To(Object, Type)
ObjectExtensions.HasMethod(Object, String)
ObjectExtensions.AddressOf<T>(T)
ReflectionExtensions.GetIdentityValue<T>(T)
ReflectionExtensions.GetIdentityValue<T, TResult>(T)
ReflectionExtensions.GetIdentityProperty<T>(T)
ReflectionExtensions.HasIdentityProperty<T>(T)
ReflectionExtensions.GetPropertyValue<T, TResult>(T, String, TResult)
ReflectionExtensions.GetPropertyInfo<T, TValue>(T, Expression<Func<T, TValue>>)
ReflectionExtensions.GetTitleValue<T>(T)
ReflectionExtensions.HasParentIdentityProperty<T>(T)
ReflectionExtensions.GetParentIdentityProperty<T>(T)
ReflectionExtensions.IsFreeApplication<T>(T)