ImmutableInterlocked.AddOrUpdate メソッド

定義

オーバーロード

名前 説明
AddOrUpdate<TKey,TValue>(ImmutableDictionary<TKey,TValue>, TKey, Func<TKey,TValue>, Func<TKey,TValue,TValue>)

ディクショナリを追加または既存のエントリを更新した後、ディクショナリから値を取得します。

AddOrUpdate<TKey,TValue>(ImmutableDictionary<TKey,TValue>, TKey, TValue, Func<TKey,TValue,TValue>)

ディクショナリを追加または既存のエントリを更新した後、ディクショナリから値を取得します。

AddOrUpdate<TKey,TValue>(ImmutableDictionary<TKey,TValue>, TKey, Func<TKey,TValue>, Func<TKey,TValue,TValue>)

ソース:
ImmutableInterlocked.cs
ソース:
ImmutableInterlocked.cs
ソース:
ImmutableInterlocked.cs
ソース:
ImmutableInterlocked.cs
ソース:
ImmutableInterlocked.cs
ソース:
ImmutableInterlocked.cs

ディクショナリを追加または既存のエントリを更新した後、ディクショナリから値を取得します。

public:
generic <typename TKey, typename TValue>
 static TValue AddOrUpdate(System::Collections::Immutable::ImmutableDictionary<TKey, TValue> ^ % location, TKey key, Func<TKey, TValue> ^ addValueFactory, Func<TKey, TValue, TValue> ^ updateValueFactory);
public static TValue AddOrUpdate<TKey,TValue>(ref System.Collections.Immutable.ImmutableDictionary<TKey,TValue> location, TKey key, Func<TKey,TValue> addValueFactory, Func<TKey,TValue,TValue> updateValueFactory);
static member AddOrUpdate : ImmutableDictionary * 'Key * Func<'Key, 'Value> * Func<'Key, 'Value, 'Value> -> 'Value
Public Shared Function AddOrUpdate(Of TKey, TValue) (ByRef location As ImmutableDictionary(Of TKey, TValue), key As TKey, addValueFactory As Func(Of TKey, TValue), updateValueFactory As Func(Of TKey, TValue, TValue)) As TValue

型パラメーター

TKey

ディクショナリによって格納されるキーの種類。

TValue

ディクショナリによって格納される値の型。

パラメーター

location
ImmutableDictionary<TKey,TValue>

指定した値がディクショナリにない場合にアトミックに更新する変数またはフィールド。

key
TKey

追加または更新する値のキー。

addValueFactory
Func<TKey,TValue>

以前に値が存在しない場合に、キーを受け取り、ディクショナリに追加する新しい値を返す関数。

updateValueFactory
Func<TKey,TValue,TValue>

キーと以前の値を受け取り、ディクショナリを更新する新しい値を返す関数。

返品

TValue

追加または更新された値。

適用対象

AddOrUpdate<TKey,TValue>(ImmutableDictionary<TKey,TValue>, TKey, TValue, Func<TKey,TValue,TValue>)

ソース:
ImmutableInterlocked.cs
ソース:
ImmutableInterlocked.cs
ソース:
ImmutableInterlocked.cs
ソース:
ImmutableInterlocked.cs
ソース:
ImmutableInterlocked.cs
ソース:
ImmutableInterlocked.cs

ディクショナリを追加または既存のエントリを更新した後、ディクショナリから値を取得します。

public:
generic <typename TKey, typename TValue>
 static TValue AddOrUpdate(System::Collections::Immutable::ImmutableDictionary<TKey, TValue> ^ % location, TKey key, TValue addValue, Func<TKey, TValue, TValue> ^ updateValueFactory);
public static TValue AddOrUpdate<TKey,TValue>(ref System.Collections.Immutable.ImmutableDictionary<TKey,TValue> location, TKey key, TValue addValue, Func<TKey,TValue,TValue> updateValueFactory);
static member AddOrUpdate : ImmutableDictionary * 'Key * 'Value * Func<'Key, 'Value, 'Value> -> 'Value
Public Shared Function AddOrUpdate(Of TKey, TValue) (ByRef location As ImmutableDictionary(Of TKey, TValue), key As TKey, addValue As TValue, updateValueFactory As Func(Of TKey, TValue, TValue)) As TValue

型パラメーター

TKey

ディクショナリによって格納されるキーの種類。

TValue

ディクショナリによって格納される値の型。

パラメーター

location
ImmutableDictionary<TKey,TValue>

指定した値がディクショナリにない場合にアトミックに更新する変数またはフィールド。

key
TKey

追加または更新する値のキー。

addValue
TValue

以前の値が存在しない場合に使用する値。

updateValueFactory
Func<TKey,TValue,TValue>

キーと以前の値を受け取り、ディクショナリを更新する新しい値を返す関数。

返品

TValue

追加または更新された値。

適用対象