Class MappedComparer<T, TMapped>
Compares instances of a type based on the output of a mapping function.
Implements
IComparer<T>
Inherited Members
Namespace: Recore.Collections.Generic
Assembly: Recore.dll
Syntax
public sealed class MappedComparer<T, TMapped> : IComparer<T>
Type Parameters
| Name | Description |
|---|---|
| T | |
| TMapped |
Constructors
| Improve this Doc View SourceMappedComparer(Func<T, TMapped>)
Creates an instance of MappedComparer<T, TMapped>.
Declaration
public MappedComparer(Func<T, TMapped> mapping)
Parameters
| Type | Name | Description |
|---|---|---|
| Func<T, TMapped> | mapping |
Methods
| Improve this Doc View SourceCompare(T, T)
Compares the mapped output of two objects.
Declaration
public int Compare(T x, T y)
Parameters
| Type | Name | Description |
|---|---|---|
| T | x | |
| T | y |
Returns
| Type | Description |
|---|---|
| Int32 |