Пример #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);
        }
Пример #2
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 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);
        }
Пример #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);
        }
Пример #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;
        }
Пример #5
0
 public static void Clear <T>(ConcurrentBag <T> concurrentBag)
 {
     ConcurrentCollectionHelper.Interleave();
     concurrentBag.Clear();
 }
Пример #6
0
 public static IEnumerator <T> GetEnumerator <T>(ConcurrentQueue <T> concurrentQueue)
 {
     ConcurrentCollectionHelper.Interleave();
     return(concurrentQueue.GetEnumerator());
 }
Пример #7
0
 public static void CopyTo <T>(ConcurrentQueue <T> concurrentQueue, T[] array, int index)
 {
     ConcurrentCollectionHelper.Interleave();
     concurrentQueue.CopyTo(array, index);
 }
Пример #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));
 }
Пример #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));
 }
Пример #10
0
 public static void Clear <T>(ConcurrentStack <T> concurrentStack)
 {
     ConcurrentCollectionHelper.Interleave();
     concurrentStack.Clear();
 }
Пример #11
0
 public static int TryPopRange <T>(ConcurrentStack <T> concurrenStack, T[] items)
 {
     ConcurrentCollectionHelper.Interleave();
     return(concurrenStack.TryPopRange(items));
 }
Пример #12
0
 public static int TryPopRange <T>(ConcurrentStack <T> concurrenStack, T[] items, int startIndex, int count)
 {
     ConcurrentCollectionHelper.Interleave();
     return(concurrenStack.TryPopRange(items, startIndex, count));
 }
Пример #13
0
 public static bool TryPop <T>(ConcurrentStack <T> concurrentStack, out T result)
 {
     ConcurrentCollectionHelper.Interleave();
     return(concurrentStack.TryPop(out result));
 }
Пример #14
0
 public static T[] ToArray <T>(ConcurrentStack <T> concurrentStack)
 {
     ConcurrentCollectionHelper.Interleave();
     return(concurrentStack.ToArray());
 }
Пример #15
0
 public static void PushRange <T>(ConcurrentStack <T> concurrentStack, T[] items, int startIndex, int count)
 {
     ConcurrentCollectionHelper.Interleave();
     concurrentStack.PushRange(items, startIndex, count);
 }
Пример #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));
 }
Пример #17
0
 public static KeyValuePair <TKey, TValue>[] ToArray <TKey, TValue>(ConcurrentDictionary <TKey, TValue> concurrentDictionary)
 {
     ConcurrentCollectionHelper.Interleave();
     return(concurrentDictionary.ToArray());
 }
Пример #18
0
 public static void Push <T>(ConcurrentStack <T> concurrentStack, T item)
 {
     ConcurrentCollectionHelper.Interleave();
     concurrentStack.Push(item);
 }
Пример #19
0
 public static bool TryRemove <TKey, TValue>(ConcurrentDictionary <TKey, TValue> concurrentDictionary, KeyValuePair <TKey, TValue> item)
 {
     ConcurrentCollectionHelper.Interleave();
     return(concurrentDictionary.TryRemove(item));
 }
Пример #20
0
 public static void PushRange <T>(ConcurrentStack <T> concurrentStack, T[] items)
 {
     ConcurrentCollectionHelper.Interleave();
     concurrentStack.PushRange(items);
 }
Пример #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));
 }
Пример #22
0
 public static void Clear <TKey, TValue>(ConcurrentDictionary <TKey, TValue> concurrentDictionary)
 {
     ConcurrentCollectionHelper.Interleave();
     concurrentDictionary.Clear();
 }
Пример #23
0
 public static bool TryPeek <T>(ConcurrentQueue <T> concurrentQueue, out T result)
 {
     ConcurrentCollectionHelper.Interleave();
     return(concurrentQueue.TryPeek(out result));
 }
Пример #24
0
 public static bool ContainsKey <TKey, TValue>(ConcurrentDictionary <TKey, TValue> concurrentDictionary, TKey key)
 {
     ConcurrentCollectionHelper.Interleave();
     return(concurrentDictionary.ContainsKey(key));
 }
Пример #25
0
 public static void Clear <T>(ConcurrentQueue <T> concurrentQueue)
 {
     ConcurrentCollectionHelper.Interleave();
     concurrentQueue.Clear();
 }
Пример #26
0
 public static IEnumerator <KeyValuePair <TKey, TValue> > GetEnumerator <TKey, TValue>(ConcurrentDictionary <TKey, TValue> concurrentDictionary)
 {
     ConcurrentCollectionHelper.Interleave();
     return(concurrentDictionary.GetEnumerator());
 }
Пример #27
0
 public static void Enqueue <T>(ConcurrentQueue <T> concurrentQueue, T item)
 {
     ConcurrentCollectionHelper.Interleave();
     concurrentQueue.Enqueue(item);
 }
Пример #28
0
 public static TValue GetOrAdd <TKey, TValue>(ConcurrentDictionary <TKey, TValue> concurrentDictionary, TKey key, TValue value)
 {
     ConcurrentCollectionHelper.Interleave();
     return(concurrentDictionary.GetOrAdd(key, value));
 }
Пример #29
0
 public static T[] ToArray <T>(ConcurrentQueue <T> concurrentQueue)
 {
     ConcurrentCollectionHelper.Interleave();
     return(concurrentQueue.ToArray());
 }
Пример #30
0
 public static void Add <T>(ConcurrentBag <T> concurrentBag, T item)
 {
     ConcurrentCollectionHelper.Interleave();
     concurrentBag.Add(item);
 }