PersistentDictionaryTKey, TValueAdd Method (TKey, TValue, PersistentDictionaryAddResult) |
Adds a specified key/value pair to the dictionary, and returns a value indicating
whether the key was newly added to the dictionary or it already existed and the value
was replaced. This method does not modify the dictionary on
which it is called but instead returns a new dictionary containing the added element.
Namespace:
AGI.Foundation.Infrastructure.Threading
Assembly:
AGI.Foundation.Core (in AGI.Foundation.Core.dll) Version: 24.2.419.0 (24.2.419.0)
Syntax public abstract PersistentDictionary<TKey, TValue> Add(
TKey key,
TValue value,
out PersistentDictionaryAddResult result
)
Public MustOverride Function Add (
key As TKey,
value As TValue,
<OutAttribute> ByRef result As PersistentDictionaryAddResult
) As PersistentDictionary(Of TKey, TValue)
public:
virtual PersistentDictionary<TKey, TValue>^ Add(
TKey key,
TValue value,
[OutAttribute] PersistentDictionaryAddResult% result
) abstract
abstract Add :
key : 'TKey *
value : 'TValue *
result : PersistentDictionaryAddResult byref -> PersistentDictionary<'TKey, 'TValue>
Parameters
- key
- Type: TKey
The key of the item to add to the dictionary. - value
- Type: TValue
The value of the item to add to the dictionary. - result
- Type: AGI.Foundation.Infrastructure.ThreadingPersistentDictionaryAddResult
On return,
a value indicating whether the key was newly added to the dictionary or it already existed
and the value was replaced.
Return Value
Type:
PersistentDictionaryTKey,
TValueA new persistent dictionary containing the specified key/value pair.
See Also