<PackageReference Include="NUnit" Version="3.6.0" />

ConcurrentQueue<T>

Represents a thread-safe first-in, first-out collection of objects.
public int Count { get; }

Gets the number of elements contained in the ConcurrentQueue<T>.

public bool IsEmpty { get; }

Gets a value that indicates whether the ConcurrentQueue<T> is empty.

public ConcurrentQueue()

Initializes a new instance of the ConcurrentQueue<T> class.

public ConcurrentQueue(IEnumerable<T> collection)

Initializes a new instance of the ConcurrentQueue<T> class that contains elements copied from the specified collection

public void CopyTo(T[] array, int index)

Copies the ConcurrentQueue<T> elements to an existing one-dimensional ArrayArray, starting at the specified array index.

public void Enqueue(T item)

Adds an object to the end of the ConcurrentQueue<T>.

Returns an enumerator that iterates through the ConcurrentQueue<T>.

public T[] ToArray()

Copies the elements stored in the ConcurrentQueue<T> to a new array.

public bool TryDequeue(out T result)

Attempts to remove and return the object at the beginning of the ConcurrentQueue<T>.

public bool TryPeek(out T result)

Attempts to return an object from the beginning of the ConcurrentQueue<T> without removing it.