Class ProjectionComparer<TSource>
Class generic in the source only to produce instances of the doubly generic class, optionally using type inference.
Namespace: Unity.UIWidgets.Runtime.external
Syntax
public static class ProjectionComparer<TSource>
Type Parameters
Name | Description |
---|---|
TSource |
Methods
Create<TKey>(Func<TSource, TKey>)
Creates an instance of ProjectionComparer using the specified projection.
Declaration
public static ProjectionComparer<TSource, TKey> Create<TKey>(Func<TSource, TKey> projection)
Parameters
Type | Name | Description |
---|---|---|
Func<TSource, TKey> | projection | Projection to use when determining the key of an element |
Returns
Type | Description |
---|---|
ProjectionComparer<TSource, TKey> | A comparer which will compare elements by projecting each element to its key, and comparing keys |
Type Parameters
Name | Description |
---|---|
TKey | Type parameter for the keys to be compared, after being projected from the elements |