DotNext by .NET Foundation and Contributors

<PackageReference Include="DotNext" Version="4.0.0-beta.3" />

 ITypeMap<TValue>

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

Associates 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.

Optional<TValue> Replace<TKey>(TValue value)

Replaces the existing value with a new value.

void Set<TKey>(TValue value)

Associates the value with the specified type.