Post­Sharp Documentation / API Reference / Post­Sharp.​Patterns.​Collections Namespace / Advisable­Dictionary(TKey, TValue) Class / Advisable­Dictionary(TKey, TValue) Methods / Advisable­Dictionary(TKey, TValue).​Set­Item Method

AdvisableDictionary<TKey, TValue>.SetItem Method

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

Namespace:  PostSharp.Patterns.Collections
Assembly:  PostSharp.Patterns.Common (in PostSharp.Patterns.Common.dll) Version: 5.0.48.0 (5.0.48.0)
Syntax
C#
protected virtual void SetItem(
	TKey key,
	TValue value,
	TValue oldValue
)

Parameters

key
Type: TKey
The key of the element to add or replace.
value
Type: TValue
The new value to assign to the key.
oldValue
Type: TValue
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 Note
This method does not cause the advices to be executed. It should be invoked only from inside the scope of the ExecuteWithAdvices<TResult, TAction>(ObjectAccessLevel, TAction) method.

See Also