Adds a key/value pair to the NamedMapTKey, TValue
if the key does not already exist.
Namespace: Soss.Client.Concurrent
Assembly: soss_namedcache (in soss_namedcache.dll) Version: 6.2.0.0
Syntax
Parameters
- key
- Type: TKey
The key of the element to add. - value
- Type: TValue
The value to be added, if the key does not already exist.
Return Value
Type: TValueThe value for the key. This will be either the existing value for the key if the key is already in the map, or the new value if the key was not in the map.
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | Thrown if key is a null reference. |
TimeoutException | Thrown when the maximum number of internal retries reached. |
See Also