Show / Hide Table of Contents

Interface ITypeMap<TValue>

Represents specialized dictionary where each key is represented by generic parameter.

Inherited Members
IReadOnlyTypeMap<TValue>.ContainsKey<TKey>()
IReadOnlyTypeMap<TValue>.TryGetValue<TKey>(out TValue)
Namespace: DotNext.Collections.Specialized
Assembly: DotNext.dll
Syntax
public interface ITypeMap<TValue> : IReadOnlyTypeMap<TValue>
Type Parameters
Name Description
TValue

The type of the value.

Methods

| Edit this page View Source

Add<TKey>(TValue)

Adds a new value with the type.

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

The value associated with the type.

Type Parameters
Name Description
TKey

The type acting as a key.

Exceptions
Type Condition
GenericArgumentException

A value associated with TKey already exists.

| Edit this page View Source

Clear()

Removes all elements from this map.

Declaration
void Clear()
| Edit this page View Source

Remove<TKey>()

Attempts to remove the value from the map.

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

true if the element successfully removed; otherwise, false.

Type Parameters
Name Description
TKey

The type acting as a key.

| Edit this page View Source

Remove<TKey>(out TValue)

Attempts to remove the value from the map.

Declaration
bool Remove<TKey>(out TValue value)
Parameters
Type Name Description
TValue value

The value of the removed element.

Returns
Type Description
bool

true if the element successfully removed; otherwise, false.

Type Parameters
Name Description
TKey

The type acting as a key.

| Edit this page View Source

Set<TKey>(TValue)

Adds or overwrites the value with the specified type.

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

The value to set.

Type Parameters
Name Description
TKey

The type acting as a key.

| Edit this page View Source

Set<TKey>(TValue, out TValue)

Replaces the existing value with a new value.

Declaration
bool Set<TKey>(TValue newValue, out TValue oldValue)
Parameters
Type Name Description
TValue newValue

A new value.

TValue 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
TKey

The type acting as a key.

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)
  • Edit this page
  • View Source
☀
☾
In this article
Back to top
Supported by the .NET Foundation
☀
☾