WithComparison<TValue>(Comparison<TValue>) Method
Specifies a typed comparison delegate to use for the ordering. A conversion to the comparison type will be attempted for the object being compared. If the conversion fails for either object, the default object comparer will be used. 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 keys, 1 and "1", and use a string-based comparison, the documents will compare as equal.
Namespace
Statiq.Core
Containing Type
OrderDocuments

Syntax

public OrderDocuments WithComparison<TValue>(Comparison<TValue> comparison)

Type Parameters

Name Description
TValue

Parameters

Name Type Description
comparison Comparison<TValue> The typed comparison delegate to use.

Return Value

Type Description
OrderDocuments The current module instance.