Cuemon .NET Framework
Create<T> Method (DynamicEqualityComparer)

The type of objects to compare.
The function delegate that calculates a hash code of the specified object and is invoked first.
The function delegate that determines whether the specified objects are equal. This delegate is invoked second if qualified.
Creates a dynamic instance of an IEqualityComparer implementation wrapping GetHashCode through hashCalculator and Equals. through equalityComparer.
Syntax
'Declaration
 
Public Shared Function Create(Of T)( _
   ByVal hashCalculator As Cuemon.Doer(Of T,Integer), _
   ByVal equalityComparer As Cuemon.Doer(Of T,T,Boolean) _
) As IEqualityComparer(Of T)
public static IEqualityComparer<T> Create<T>( 
   Cuemon.Doer<T,int> hashCalculator,
   Cuemon.Doer<T,T,bool> equalityComparer
)

Parameters

hashCalculator
The function delegate that calculates a hash code of the specified object and is invoked first.
equalityComparer
The function delegate that determines whether the specified objects are equal. This delegate is invoked second if qualified.

Type Parameters

T
The type of objects to compare.

Return Value

A dynamic instance of IEqualityComparer for type T.
Remarks
The function delegate, hashCalculator (GetHashCode), is evaluated with a conditional-AND before the second function delegate, equalityComparer (Equals), is ivoked.
Requirements

Target Platforms: Windows 8, Windows Server 2012, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

DynamicEqualityComparer Class
DynamicEqualityComparer Members

 

 


| Cuemon is licensed under a The MIT License (MIT)



© 2009-2015 Weubphoria. All Rights Reserved.

Documentation made easy with Document! X by Innovasys

Send Feedback