ImmutableHashMapExtensions.cs (4)
24public static TValue? GetOrAdd<TKey, TValue, TArg>(ref ImmutableHashMap<TKey, TValue> location, TKey key, Func<TKey, TArg, TValue?> valueProvider, TArg factoryArgument)
30var map = Volatile.Read(ref location);
45var augmentedMap = map.Add(key, newValue);
46var replacedMap = Interlocked.CompareExchange(ref location, augmentedMap, map);