PostSharpAPI ReferencePost­Sharp.​Patterns.​CollectionsAdvisable­Dictionary<TKey, TValue>Set­Item
Open sandboxFocus

AdvisableDictionary<TKey, TValue>.SetItem Method

SetItem(TKey, TValue, TValue)

Sets the value with the specified key in the underlying dictionary.

Declaration
protected virtual void SetItem(TKey key, TValue value, TValue oldValue)
Parameters
Type Name Description
TKey key

The key of the element to add or replace.

TValue value

The new value to assign to the key.

TValue oldValue

The old value assigned to key, or null if there is currently no value assigned to key.

Remarks

There is redundancy in requiring both key and oldValue, but this redundancy is required for performance reason.

note

This method does not cause the advices to be executed. It should be invoked only from inside the scope of the ExecuteWithAdvices method.