DotNext by .NET Foundation and Contributors

<PackageReference Include="DotNext" Version="5.8.0" />

 ITypeMap<TValue>

public interface ITypeMap<TValue> : IReadOnlyTypeMap<TValue>
Represents specialized dictionary where the each key is represented by generic parameter.
void Add<TKey>(TValue value)

Adds a new value with the type.

void Clear()

Removes all elements from this map.

bool Remove<TKey>()

Attempts to remove the value from the map.

bool Remove<TKey>(out TValue value)

Attempts to remove the value from the map.

void Set<TKey>(TValue value)

Adds or overwrites the value with the specified type.

bool Set<TKey>(TValue newValue, out TValue oldValue)

Replaces the existing value with a new value.