SystemCollectionsConcurrent_ProducerConsumerCollectionDebugView<T>
A debugger view of the IProducerConsumerCollection that makes it simple to browse the
collection's contents at a point in time.
using System.Diagnostics;
namespace System.Collections.Concurrent
{
internal sealed class SystemCollectionsConcurrent_ProducerConsumerCollectionDebugView<T>
{
private IProducerConsumerCollection<T> m_collection;
[DebuggerBrowsable(DebuggerBrowsableState.RootHidden)]
public T[] Items {
get {
return m_collection.ToArray();
}
}
public SystemCollectionsConcurrent_ProducerConsumerCollectionDebugView(IProducerConsumerCollection<T> collection)
{
if (collection == null)
throw new ArgumentNullException("collection");
m_collection = collection;
}
}
}