Exemple #1
0
        public static ICollection <TKey> get_Keys <TKey, TValue>(ConcurrentDictionary <TKey, TValue> concurrentDictionary)
#pragma warning restore IDE1006 // Naming Styles
#pragma warning restore SA1300  // Element should begin with upper-case letter
#pragma warning restore CA1707  // Identifiers should not contain underscores
        {
            ConcurrentCollectionHelper.Interleave();
            return(concurrentDictionary.Keys);
        }
#pragma warning disable CA1707  // Identifiers should not contain underscores
#pragma warning disable SA1300  // Element should begin with upper-case letter
#pragma warning disable IDE1006 // Naming Styles
        public static bool get_IsEmpty <T>(ConcurrentQueue <T> concurrentQueue)
#pragma warning restore IDE1006 // Naming Styles
#pragma warning restore SA1300  // Element should begin with upper-case letter
#pragma warning restore CA1707  // Identifiers should not contain underscores
        {
            ConcurrentCollectionHelper.Interleave();
            return(concurrentQueue.IsEmpty);
        }
Exemple #3
0
#pragma warning disable CA1707  // Identifiers should not contain underscores
#pragma warning disable SA1300  // Element should begin with upper-case letter
#pragma warning disable IDE1006 // Naming Styles
        public static int get_Count <T>(ConcurrentStack <T> concurrentStack)
#pragma warning restore IDE1006 // Naming Styles
#pragma warning restore SA1300  // Element should begin with upper-case letter
#pragma warning restore CA1707  // Identifiers should not contain underscores
        {
            ConcurrentCollectionHelper.Interleave();
            return(concurrentStack.Count);
        }
Exemple #4
0
#pragma warning disable CA1707  // Identifiers should not contain underscores
#pragma warning disable SA1300  // Element should begin with upper-case letter
#pragma warning disable IDE1006 // Naming Styles
        public static void set_Item <TKey, TValue>(ConcurrentDictionary <TKey, TValue> concurrentDictionary, TKey key, TValue value)
#pragma warning restore IDE1006 // Naming Styles
#pragma warning restore SA1300  // Element should begin with upper-case letter
#pragma warning restore CA1707  // Identifiers should not contain underscores
        {
            ConcurrentCollectionHelper.Interleave();
            concurrentDictionary[key] = value;
        }
 public static void Clear <T>(ConcurrentBag <T> concurrentBag)
 {
     ConcurrentCollectionHelper.Interleave();
     concurrentBag.Clear();
 }
 public static IEnumerator <T> GetEnumerator <T>(ConcurrentQueue <T> concurrentQueue)
 {
     ConcurrentCollectionHelper.Interleave();
     return(concurrentQueue.GetEnumerator());
 }
 public static void CopyTo <T>(ConcurrentQueue <T> concurrentQueue, T[] array, int index)
 {
     ConcurrentCollectionHelper.Interleave();
     concurrentQueue.CopyTo(array, index);
 }
Exemple #8
0
 public static bool TryUpdate <TKey, TValue>(ConcurrentDictionary <TKey, TValue> concurrentDictionary, TKey key, TValue newValue, TValue comparisonValue)
 {
     ConcurrentCollectionHelper.Interleave();
     return(concurrentDictionary.TryUpdate(key, newValue, comparisonValue));
 }
Exemple #9
0
 public static bool TryRemove <TKey, TValue>(ConcurrentDictionary <TKey, TValue> concurrentDictionary, TKey key, out TValue value)
 {
     ConcurrentCollectionHelper.Interleave();
     return(concurrentDictionary.TryRemove(key, out value));
 }
Exemple #10
0
 public static void Clear <T>(ConcurrentStack <T> concurrentStack)
 {
     ConcurrentCollectionHelper.Interleave();
     concurrentStack.Clear();
 }
Exemple #11
0
 public static int TryPopRange <T>(ConcurrentStack <T> concurrenStack, T[] items)
 {
     ConcurrentCollectionHelper.Interleave();
     return(concurrenStack.TryPopRange(items));
 }
Exemple #12
0
 public static int TryPopRange <T>(ConcurrentStack <T> concurrenStack, T[] items, int startIndex, int count)
 {
     ConcurrentCollectionHelper.Interleave();
     return(concurrenStack.TryPopRange(items, startIndex, count));
 }
Exemple #13
0
 public static bool TryPop <T>(ConcurrentStack <T> concurrentStack, out T result)
 {
     ConcurrentCollectionHelper.Interleave();
     return(concurrentStack.TryPop(out result));
 }
Exemple #14
0
 public static T[] ToArray <T>(ConcurrentStack <T> concurrentStack)
 {
     ConcurrentCollectionHelper.Interleave();
     return(concurrentStack.ToArray());
 }
Exemple #15
0
 public static void PushRange <T>(ConcurrentStack <T> concurrentStack, T[] items, int startIndex, int count)
 {
     ConcurrentCollectionHelper.Interleave();
     concurrentStack.PushRange(items, startIndex, count);
 }
Exemple #16
0
 public static TValue GetOrAdd <TKey, TArg, TValue>(ConcurrentDictionary <TKey, TValue> concurrentDictionary, TKey key, Func <TKey, TArg, TValue> valueFactory,
                                                    TArg factoryArgument)
 {
     ConcurrentCollectionHelper.Interleave();
     return(concurrentDictionary.GetOrAdd(key, valueFactory, factoryArgument));
 }
Exemple #17
0
 public static KeyValuePair <TKey, TValue>[] ToArray <TKey, TValue>(ConcurrentDictionary <TKey, TValue> concurrentDictionary)
 {
     ConcurrentCollectionHelper.Interleave();
     return(concurrentDictionary.ToArray());
 }
Exemple #18
0
 public static void Push <T>(ConcurrentStack <T> concurrentStack, T item)
 {
     ConcurrentCollectionHelper.Interleave();
     concurrentStack.Push(item);
 }
Exemple #19
0
 public static bool TryRemove <TKey, TValue>(ConcurrentDictionary <TKey, TValue> concurrentDictionary, KeyValuePair <TKey, TValue> item)
 {
     ConcurrentCollectionHelper.Interleave();
     return(concurrentDictionary.TryRemove(item));
 }
Exemple #20
0
 public static void PushRange <T>(ConcurrentStack <T> concurrentStack, T[] items)
 {
     ConcurrentCollectionHelper.Interleave();
     concurrentStack.PushRange(items);
 }
Exemple #21
0
 public static TValue AddOrUpdate <TKey, TArg, TValue>(ConcurrentDictionary <TKey, TValue> concurrentDictionary, TKey key, Func <TKey, TArg, TValue> addValueFactory,
                                                       Func <TKey, TValue, TArg, TValue> updateValueFactory, TArg factoryArgument)
 {
     ConcurrentCollectionHelper.Interleave();
     return(concurrentDictionary.AddOrUpdate(key, addValueFactory, updateValueFactory, factoryArgument));
 }
Exemple #22
0
 public static void Clear <TKey, TValue>(ConcurrentDictionary <TKey, TValue> concurrentDictionary)
 {
     ConcurrentCollectionHelper.Interleave();
     concurrentDictionary.Clear();
 }
 public static bool TryPeek <T>(ConcurrentQueue <T> concurrentQueue, out T result)
 {
     ConcurrentCollectionHelper.Interleave();
     return(concurrentQueue.TryPeek(out result));
 }
Exemple #24
0
 public static bool ContainsKey <TKey, TValue>(ConcurrentDictionary <TKey, TValue> concurrentDictionary, TKey key)
 {
     ConcurrentCollectionHelper.Interleave();
     return(concurrentDictionary.ContainsKey(key));
 }
 public static void Clear <T>(ConcurrentQueue <T> concurrentQueue)
 {
     ConcurrentCollectionHelper.Interleave();
     concurrentQueue.Clear();
 }
Exemple #26
0
 public static IEnumerator <KeyValuePair <TKey, TValue> > GetEnumerator <TKey, TValue>(ConcurrentDictionary <TKey, TValue> concurrentDictionary)
 {
     ConcurrentCollectionHelper.Interleave();
     return(concurrentDictionary.GetEnumerator());
 }
 public static void Enqueue <T>(ConcurrentQueue <T> concurrentQueue, T item)
 {
     ConcurrentCollectionHelper.Interleave();
     concurrentQueue.Enqueue(item);
 }
Exemple #28
0
 public static TValue GetOrAdd <TKey, TValue>(ConcurrentDictionary <TKey, TValue> concurrentDictionary, TKey key, TValue value)
 {
     ConcurrentCollectionHelper.Interleave();
     return(concurrentDictionary.GetOrAdd(key, value));
 }
 public static T[] ToArray <T>(ConcurrentQueue <T> concurrentQueue)
 {
     ConcurrentCollectionHelper.Interleave();
     return(concurrentQueue.ToArray());
 }
 public static void Add <T>(ConcurrentBag <T> concurrentBag, T item)
 {
     ConcurrentCollectionHelper.Interleave();
     concurrentBag.Add(item);
 }