DotNext by .NET Foundation and Contributors

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

 ITypeMap

public interface ITypeMap : IReadOnlyTypeMap
Represents specialized set that store values of different types efficiently.
void Add<T>(T value)

Adds a new value associated with type T to this set.

void Clear()

Removes all elements from this set.

bool Remove<T>()

Attempts to remove the value of type T from this set.

bool Remove<T>(out T value)

Attempts to remove the value of type T from this set.

void Set<T>(T value)

Adds or overwrites the value associated with type T.

bool Set<T>(T newValue, out T oldValue)

Replaces the value associated with type T.