I get IndexOutOfRangeException while using IContextStore.Set. Looks like a bug in TypedDictionary
bacause:
private static int typeIndex = -1;
when we use Add:
public void Add<TKey>(TValue value)
{
lock (_lockObject)
{
var id = TypeKey<TKey>.Id;
if (id >= _values.Length)
{
Array.Resize(ref _values, (int)(id * _growthFactor));
}
_values[id] = value;
}
}
With very first use id becomes 0 and 0 * _growthFactor = 0 so _values[id] = value; fails.