// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
// =+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
//
//
//
// A common interface for all concurrent collections.
//
// =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
namespace System.Collections.Concurrent
{
///
/// Defines methods to manipulate thread-safe collections intended for producer/consumer usage.
///
/// Specifies the type of elements in the collection.
///
/// All implementations of this interface must enable all members of this interface
/// to be used concurrently from multiple threads.
///
internal interface IProducerConsumerCollection : IEnumerable, ICollection
{
///
/// Copies the elements of the to
/// an
/// , starting at a specified index.
///
/// The one-dimensional that is the destination of
/// the elements copied from the .
/// The array must have zero-based indexing.
/// The zero-based index in at which copying
/// begins.
/// is a null reference (Nothing in
/// Visual Basic).
/// is less than
/// zero.
/// is equal to or greater than the
/// length of the
/// -or- The number of elements in the source is greater than the
/// available space from to the end of the destination .
///
void CopyTo(T[] array, int index);
///
/// Copies the elements contained in the to a new array.
///
/// A new array containing the elements copied from the .
T[] ToArray();
}
///
/// A debugger view of the IProducerConsumerCollection that makes it simple to browse the
/// collection's contents at a point in time.
///
/// The type of elements stored within.
internal sealed class SystemCollectionsConcurrent_ProducerConsumerCollectionDebugView
{
private IProducerConsumerCollection m_collection; // The collection being viewed.
}
}