Export (0) Print
Expand All

ImmutableInterlocked Class

Contains interlocked exchange mechanisms for immutable collections.

NuGet package: Microsoft.Bcl.Immutable (about immutable collections and how to install)

System.Object
  System.Collections.Immutable.ImmutableInterlocked

Namespace:  System.Collections.Immutable
Assembly:  System.Collections.Immutable (in System.Collections.Immutable.dll)

public static class ImmutableInterlocked

The ImmutableInterlocked type exposes the following members.

  NameDescription
Public methodStatic memberAddOrUpdate<TKey, TValue>(ImmutableDictionary<TKey, TValue>, TKey, Func<TKey, TValue>, Func<TKey, TValue, TValue>)Obtains the value from a dictionary after having added it or updated an existing entry.
Public methodStatic memberAddOrUpdate<TKey, TValue>(ImmutableDictionary<TKey, TValue>, TKey, TValue, Func<TKey, TValue, TValue>)Obtains the value from a dictionary after having added it or updated an existing entry.
Public methodStatic memberEnqueue<T>Atomically enqueues an element to the end of a queue.
Public methodStatic memberGetOrAdd<TKey, TValue>(ImmutableDictionary<TKey, TValue>, TKey, Func<TKey, TValue>)Gets the value for the specified key from the dictionary, or if the key was not found, adds a new value to the dictionary.
Public methodStatic memberGetOrAdd<TKey, TValue>(ImmutableDictionary<TKey, TValue>, TKey, TValue)Gets the value for the specified key from the dictionary, or if the key was not found, adds a new value to the dictionary.
Public methodStatic memberGetOrAdd<TKey, TValue, TArg>(ImmutableDictionary<TKey, TValue>, TKey, Func<TKey, TArg, TValue>, TArg)Gets the value for the specified key from the dictionary, or if the key was not found, adds a new value to the dictionary.
Public methodStatic memberInterlockedCompareExchange<T> [This topic is preliminary and is subject to change.]
Compares two immutable arrays for equality and, if they are equal, replaces one of the arrays.
Public methodStatic memberInterlockedExchange<T> [This topic is preliminary and is subject to change.]
Sets an array to the specified array and returns a reference to the original array, as an atomic operation.
Public methodStatic memberInterlockedInitialize<T> [This topic is preliminary and is subject to change.]
Sets an array to the specified array if the array has not been initialized.
Public methodStatic memberPush<T>Pushes a new element onto the stack.
Public methodStatic memberTryAdd<TKey, TValue>Adds the specified key and value to the dictionary if the key is not in the dictionary.
Public methodStatic memberTryDequeue<T>Atomically removes and returns the specified element at the head of the queue, if the queue is not empty.
Public methodStatic memberTryPop<T>Removes an element from the top of the stack, if there is an element to remove.
Public methodStatic memberTryRemove<TKey, TValue>Removes the element with the specified key, if the key exists.
Public methodStatic memberTryUpdate<TKey, TValue>Sets the specified key to the specified value if the specified key already is set to a specific value.
Top

This type is thread safe.

Show:
© 2014 Microsoft