GroupBy.

WithComparer<TValue>(IEqualityComparer<TValue>) Method

Summary

Specifies a typed equality comparer to use for the grouping. A conversion to the comparer type will be attempted for all metadata values. If the conversion fails, the value will not be considered equal. Note that this will also have the effect of treating different convertible types as being of the same type. For example, if you have two group keys, 1 and "1" (in that order), and use a string-based comparison, you will only end up with a single group for those documents with a group key of 1 (since the int key came first).
Assembly
Wyam.Core.dll
Namespace
Wyam.Core.Modules.Control
Containing Type
GroupBy

Syntax

public GroupBy WithComparer<TValue>(IEqualityComparer<TValue> comparer)

Type Parameters

Name Description
TValue

Parameters

Name Type Description
comparer IEqualityComparer<TValue> The typed equality comparer to use.

Return Value

Type Description
GroupBy The current module instance.
GitHub