<PackageReference Include="Castle.Windsor" Version="3.2.1" />

SimpleThreadSafeDictionary<TKey, TValue>

public class SimpleThreadSafeDictionary<TKey, TValue>
Simple type for thread safe adding/reading to/from keyed store. The difference between this and built in concurrent dictionary is that in this case adding is happening under a lock so never more than one thread will be adding at a time.

public bool Contains(TKey key)

public TValue[] EjectAllValues()

Returns all values and clears the dictionary

public TValue GetOrAdd(TKey key, Func<TKey, TValue> factory)

public TValue GetOrThrow(TKey key)