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>
- IComparer
- 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
Name | Summary |
---|---|
ConvertingComparer |
Methods
Name | Return Value | Summary |
---|---|---|
Compare |
int |