Click or drag to resize

ConcurrentTokenizedPriorityQueueTKey, TValue, TTokenAddOrUpdate(TToken, TKey, TValue) Method

Adds a key/value pair associated with a token to the queue (if no such token is already present), or updates the already present key/value pair associated with the provided token.

Namespace: Altaxo.Collections
Assembly: AltaxoCore (in AltaxoCore.dll) Version: 4.8.3179.0 (4.8.3179.0)
Syntax
C#
public bool AddOrUpdate(
	TToken token,
	TKey key,
	TValue value
)

Parameters

token  TToken
The token.
key  TKey
The key that should be added or updated
value  TValue
The value that should be added or updated

Return Value

Boolean
True if the item was not present and therefore was added to the queue, false if the item was already present and therefore updated.
Exceptions
ExceptionCondition
InvalidOperationExceptionThis queue is generating tokens by itself. Use Enqueue(key, value) instead!
See Also