Click or drag to resize
ExtensionsAddOrSetTKey, TValue Method
Dictionary helper that allows for idempotent updates. You don't need to care whether or not this item is already in the collection in order to update it.

Namespace: Akka.Util.Internal
Assembly: Akka (in Akka.dll) Version: 0.8.0.0 (0.8.0.0)
Syntax
public static void AddOrSet<TKey, TValue>(
	this IDictionary<TKey, TValue> hash,
	TKey key,
	TValue value
)

Parameters

hash
Type: System.Collections.GenericIDictionaryTKey, TValue

[Missing <param name="hash"/> documentation for "M:Akka.Util.Internal.Extensions.AddOrSet``2(System.Collections.Generic.IDictionary{``0,``1},``0,``1)"]

key
Type: TKey

[Missing <param name="key"/> documentation for "M:Akka.Util.Internal.Extensions.AddOrSet``2(System.Collections.Generic.IDictionary{``0,``1},``0,``1)"]

value
Type: TValue

[Missing <param name="value"/> documentation for "M:Akka.Util.Internal.Extensions.AddOrSet``2(System.Collections.Generic.IDictionary{``0,``1},``0,``1)"]

Type Parameters

TKey

[Missing <typeparam name="TKey"/> documentation for "M:Akka.Util.Internal.Extensions.AddOrSet``2(System.Collections.Generic.IDictionary{``0,``1},``0,``1)"]

TValue

[Missing <typeparam name="TValue"/> documentation for "M:Akka.Util.Internal.Extensions.AddOrSet``2(System.Collections.Generic.IDictionary{``0,``1},``0,``1)"]

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IDictionaryTKey, TValue. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also