Merge does a blind remove, and then add if the new value is different from the old one.

Namespace: MonoSoftware.Core.Collections
Assembly: MonoSoftware.Core (in MonoSoftware.Core.dll) Version: 1.0.40.669 (1.0.40.669)

Syntax

C#
public void MergeSafe(
	TKey key,
	TValue newValue
)
Visual Basic
Public Sub MergeSafe ( 
	key As TKey,
	newValue As TValue
)
Visual C++
public:
void MergeSafe(
	TKey key, 
	TValue newValue
)
F#
member MergeSafe : 
        key : 'TKey * 
        newValue : 'TValue -> unit 

Parameters

key
Type: TKey
Key to lookup
newValue
Type: TValue
New Value

Remarks

This method is change from the author's original implementation, write lock happens only if key doesn't exist or if the new value is different from the old one.

See Also