Interface ITypeMap
Represents specialized set that store values of different types efficiently.
Inherited Members
Namespace: DotNext.Collections.Specialized
Assembly: DotNext.dll
Syntax
public interface ITypeMap : IReadOnlyTypeMap, IEnumerable<object>, IEnumerable
Methods
| Edit this page View SourceAdd<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 |
Clear()
Removes all elements from this set.
Declaration
void Clear()
Remove<T>()
Attempts to remove the value of type T
from this set.
Declaration
bool Remove<T>()
Returns
Type | Description |
---|---|
bool |
Type Parameters
Name | Description |
---|---|
T | The type which value should be removed. |
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 |
Type Parameters
Name | Description |
---|---|
T | The type which value should be removed. |
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. |
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. |