Пример #1
0
        /// <summary>
        /// Gets a value that indicates whether the concurrent stack is empty.
        /// </summary>
#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(SystemConcurrent.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
        {
            Helper.Interleave();
            return(concurrentStack.IsEmpty);
        }
Пример #2
0
 /// <summary>
 /// Inserts multiple objects at the top of the concurrent stack atomically.
 /// </summary>
 public static void PushRange(SystemConcurrent.ConcurrentStack <T> concurrentStack, T[] items, int startIndex, int count)
 {
     Helper.Interleave();
     concurrentStack.PushRange(items, startIndex, count);
 }
Пример #3
0
 /// <summary>
 /// Inserts multiple objects at the top of the concurrent stack atomically.
 /// </summary>
 public static void PushRange(SystemConcurrent.ConcurrentStack <T> concurrentStack, T[] items)
 {
     Helper.Interleave();
     concurrentStack.PushRange(items);
 }
Пример #4
0
 /// <summary>
 /// Inserts an object at the top of the concurrent stack.
 /// </summary>
 public static void Push(SystemConcurrent.ConcurrentStack <T> concurrentStack, T item)
 {
     Helper.Interleave();
     concurrentStack.Push(item);
 }
Пример #5
0
 /// <summary>
 /// Returns an enumerator that iterates through the  concurrent stack.
 /// </summary>
 public static SystemGenerics.IEnumerator <T> GetEnumerator(SystemConcurrent.ConcurrentStack <T> concurrentStack)
 {
     Helper.Interleave();
     return(concurrentStack.GetEnumerator());
 }
Пример #6
0
 /// <summary>
 /// Copies the concurrent stack elements to an existing one-dimensional array,
 /// starting at the specified array index.
 /// </summary>
 public static void CopyTo(SystemConcurrent.ConcurrentStack <T> concurrentStack, T[] array, int index)
 {
     Helper.Interleave();
     concurrentStack.CopyTo(array, index);
 }
Пример #7
0
 /// <summary>
 /// Removes all objects from the concurrent stack.
 /// </summary>
 public static void Clear(SystemConcurrent.ConcurrentStack <T> concurrentStack)
 {
     Helper.Interleave();
     concurrentStack.Clear();
 }
Пример #8
0
 /// <summary>
 /// Attempts to pop and return multiple objects from the top of the concurrent stack atomically.
 /// </summary>
 public static int TryPopRange(SystemConcurrent.ConcurrentStack <T> concurrentStack, T[] items)
 {
     Helper.Interleave();
     return(concurrentStack.TryPopRange(items));
 }
Пример #9
0
 /// <summary>
 /// Attempts to pop and return multiple objects from the top of the concurrent stack atomically.
 /// </summary>
 public static int TryPopRange(SystemConcurrent.ConcurrentStack <T> concurrentStack, T[] items, int startIndex, int count)
 {
     Helper.Interleave();
     return(concurrentStack.TryPopRange(items, startIndex, count));
 }
Пример #10
0
 /// <summary>
 /// Attempt to pop and return the object at the top of the concurrent stack.
 /// </summary>
 public static bool TryPop(SystemConcurrent.ConcurrentStack <T> concurrentStack, out T result)
 {
     Helper.Interleave();
     return(concurrentStack.TryPop(out result));
 }
Пример #11
0
 /// <summary>
 /// Copies the elements stored in the concurrent stack to a new array.
 /// </summary>
 public static T[] ToArray(SystemConcurrent.ConcurrentStack <T> concurrentStack)
 {
     Helper.Interleave();
     return(concurrentStack.ToArray());
 }