ConvertingComparer<T> Class
Adapts a typed equality comparer to untyped metadata by attempting to convert the metadata values to the comparer type before running the comparison. If either type can not be converted to T, the comparison returns the default object comparison.
Namespace
Statiq.Common
Interfaces
  • IComparer<object>
Base Types
  • object
ConvertingComparer<T>
object
IComparer<object>

Syntax

public class ConvertingComparer<T> : IComparer<object>

Type Parameters

Name Description
T The value type to convert to for comparisons.

Constructors

Methods

Name Return Value Summary
Compare(object, object) int

Extension Methods