AgnosticDictionary<TValue>

public sealed class AgnosticDictionary<TValue>
A dictionary which relies on type assistant based comparisons. This will be much slower than a System.Collections.Generic.Dictionary for types which can be stored in it, but it's completely type-agnostic.
TValue

Constructors

AgnosticDictionary

#
public AgnosticDictionary()
Create an empty hash set.

Properties

Cardinality

#
public int Cardinality { get; }
Gets the number of elements (minus any null element) in this set.

CardinalityWithNull

#
public int CardinalityWithNull { get; }
Gets the number of elements (including the null element) in this set.

HasNull

#
public bool HasNull { get; }
Gets whether this set contains a null value.

Keys

#
public IEnumerable<IPear> Keys { get; }
Iterate over all elements in this set.

KeysWithNull

#
public IEnumerable<IPear> KeysWithNull { get; }
Iterate over all elements (inluding the null) in this set.

NullValue

#
public TValue NullValue { get; }
Gets the value associated with the null key.

Methods

Add

#
public bool Add(IPear key, TValue value)
key (IPear)
value (TValue)

Contains

#
public bool Contains(IPear key, out TValue value)
key (IPear)
value (out TValue)

Contains

#
public bool Contains(IPear key)
key (IPear)