Show / Hide Table of Contents

Interface ITypeMap

Represents specialized set that store values of different types efficiently.

Inherited Members
IReadOnlyTypeMap.Contains<T>()
IReadOnlyTypeMap.TryGetValue<T>(out T)
IEnumerable<object>.GetEnumerator()
Namespace: DotNext.Collections.Specialized
Assembly: DotNext.dll
Syntax
public interface ITypeMap : IReadOnlyTypeMap, IEnumerable<object>, IEnumerable

Methods

| Edit this page View Source

Add<T>(T)

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

Declaration
void Add<T>(T value)
Parameters
Type Name Description
T value

The value to be added.

Type Parameters
Name Description
T

The type of the value.

Exceptions
Type Condition
GenericArgumentException

A value associated with T already exists.

| Edit this page View Source

Clear()

Removes all elements from this set.

Declaration
void Clear()
| Edit this page View Source

Remove<T>()

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

Declaration
bool Remove<T>()
Returns
Type Description
bool

true if the element successfully removed; otherwise, false.

Type Parameters
Name Description
T

The type which value should be removed.

| Edit this page View Source

Remove<T>(out T?)

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

Declaration
bool Remove<T>(out T? value)
Parameters
Type Name Description
T value

Removed value.

Returns
Type Description
bool

true if the element successfully removed; otherwise, false.

Type Parameters
Name Description
T

The type which value should be removed.

| Edit this page View Source

Set<T>(T)

Adds or overwrites the value associated with type T.

Declaration
void Set<T>(T value)
Parameters
Type Name Description
T value

The value to set.

Type Parameters
Name Description
T

The type of the value.

| Edit this page View Source

Set<T>(T, out T?)

Replaces the value associated with type T.

Declaration
bool Set<T>(T newValue, out T? oldValue)
Parameters
Type Name Description
T newValue

The value to set.

T oldValue

The replaced value.

Returns
Type Description
bool

true if value is replaced; false if a new value is added without replacement.

Type Parameters
Name Description
T

The type of the value.

Extension Methods

BasicExtensions.As<T>(T)
BasicExtensions.GetUserData<T>(T)
BasicExtensions.IsBetween<T, TLowerBound, TUpperBound>(T, TLowerBound, TUpperBound)
BasicExtensions.IsOneOf<T>(T, ReadOnlySpan<T>)
ExpressionBuilder.Const<T>(T)
AsyncLockAcquisition.AcquireLockAsync<T>(T, CancellationToken)
AsyncLockAcquisition.AcquireLockAsync<T>(T, TimeSpan, CancellationToken)
AsyncLockAcquisition.AcquireReadLockAsync<T>(T, CancellationToken)
AsyncLockAcquisition.AcquireReadLockAsync<T>(T, TimeSpan, CancellationToken)
AsyncLockAcquisition.AcquireWriteLockAsync<T>(T, bool, CancellationToken)
AsyncLockAcquisition.AcquireWriteLockAsync<T>(T, bool, TimeSpan, CancellationToken)
AsyncLockAcquisition.AcquireWriteLockAsync<T>(T, CancellationToken)
AsyncLockAcquisition.AcquireWriteLockAsync<T>(T, TimeSpan, CancellationToken)
LockAcquisition.AcquireReadLock<T>(T)
LockAcquisition.AcquireReadLock<T>(T, TimeSpan)
LockAcquisition.AcquireUpgradeableReadLock<T>(T)
LockAcquisition.AcquireUpgradeableReadLock<T>(T, TimeSpan)
LockAcquisition.AcquireWriteLock<T>(T)
LockAcquisition.AcquireWriteLock<T>(T, TimeSpan)
Collection.Append<T>(IEnumerable<T>, params T[])
Collection.Copy<T>(IEnumerable<T>, int, MemoryAllocator<T>?)
Collection.ElementAt<T>(IEnumerable<T>, int, out T)
Collection.FirstOrNone<T>(IEnumerable<T>)
Collection.ForEachAsync<T>(IEnumerable<T>, Func<T, CancellationToken, ValueTask>, CancellationToken)
Collection.ForEach<T>(IEnumerable<T>, Action<T>)
Collection.LastOrNone<T>(IEnumerable<T>)
Collection.Prepend<T>(IEnumerable<T>, params T[])
Collection.SequenceHashCode<T>(IEnumerable<T>, bool)
Collection.SkipNulls<T>(IEnumerable<T?>)
Collection.ToAsyncEnumerable<T>(IEnumerable<T>)
Collection.ToString<T>(IEnumerable<T>, string, string)
Enumerator.GetAsyncEnumerator<T>(IEnumerable<T>, CancellationToken)
  • Edit this page
  • View Source
☀
☾
In this article
Back to top
Supported by the .NET Foundation
☀
☾