DotNext by .NET Foundation and Contributors

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

 TypeMap

Represents fast implementation of ITypeMap which is not thread safe.
public TypeMap(int capacity)

Initializes a new empty set.

public TypeMap()

Initializes a new empty set.

public void Add<T>(T value)

public void Clear()

public bool Contains<T>()

public ref T GetValueRefOrAddDefault<T>(out bool exists) where T : struct

Gets the value associated with the specified type.

public bool Remove<T>()

public bool Remove<T>(out T value)

public void Set<T>(T value)

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

public bool TryGetValue<T>(out T value)