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
graph BT Type-->Base0["object"] Type-.->Interface0["IComparer<object>"] Type["ConvertingComparer<T>"] class Type type-node

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