BlockingCollection<T> BlockingCollection<T> BlockingCollection<T> Constructors

Definition

Overloads

BlockingCollection<T>() BlockingCollection<T>() BlockingCollection<T>()

Initializes a new instance of the BlockingCollection<T> class without an upper-bound.

BlockingCollection<T>(IProducerConsumerCollection<T>) BlockingCollection<T>(IProducerConsumerCollection<T>) BlockingCollection<T>(IProducerConsumerCollection<T>)

Initializes a new instance of the BlockingCollection<T> class without an upper-bound and using the provided IProducerConsumerCollection<T> as its underlying data store.

BlockingCollection<T>(Int32) BlockingCollection<T>(Int32) BlockingCollection<T>(Int32)

Initializes a new instance of the BlockingCollection<T> class with the specified upper-bound.

BlockingCollection<T>(IProducerConsumerCollection<T>, Int32) BlockingCollection<T>(IProducerConsumerCollection<T>, Int32) BlockingCollection<T>(IProducerConsumerCollection<T>, Int32)

Initializes a new instance of the BlockingCollection<T> class with the specified upper-bound and using the provided IProducerConsumerCollection<T> as its underlying data store.

BlockingCollection<T>() BlockingCollection<T>() BlockingCollection<T>()

Initializes a new instance of the BlockingCollection<T> class without an upper-bound.

public:
 BlockingCollection();
public BlockingCollection ();
Public Sub New ()

Remarks

The default underlying collection is a ConcurrentQueue<T> object, which provides first in, first out (FIFO) behavior.

BlockingCollection<T>(IProducerConsumerCollection<T>) BlockingCollection<T>(IProducerConsumerCollection<T>) BlockingCollection<T>(IProducerConsumerCollection<T>)

Initializes a new instance of the BlockingCollection<T> class without an upper-bound and using the provided IProducerConsumerCollection<T> as its underlying data store.

public:
 BlockingCollection(System::Collections::Concurrent::IProducerConsumerCollection<T> ^ collection);
public BlockingCollection (System.Collections.Concurrent.IProducerConsumerCollection<T> collection);
Public Sub New (collection As IProducerConsumerCollection(Of T))
Parameters
collection
IProducerConsumerCollection<T> IProducerConsumerCollection<T> IProducerConsumerCollection<T>

The collection to use as the underlying data store.

Exceptions

BlockingCollection<T>(Int32) BlockingCollection<T>(Int32) BlockingCollection<T>(Int32)

Initializes a new instance of the BlockingCollection<T> class with the specified upper-bound.

public:
 BlockingCollection(int boundedCapacity);
public BlockingCollection (int boundedCapacity);
Public Sub New (boundedCapacity As Integer)
Parameters
boundedCapacity
Int32 Int32 Int32

The bounded size of the collection.

Exceptions

Remarks

The default underlying collection is a ConcurrentQueue<T>.

BlockingCollection<T>(IProducerConsumerCollection<T>, Int32) BlockingCollection<T>(IProducerConsumerCollection<T>, Int32) BlockingCollection<T>(IProducerConsumerCollection<T>, Int32)

Initializes a new instance of the BlockingCollection<T> class with the specified upper-bound and using the provided IProducerConsumerCollection<T> as its underlying data store.

public:
 BlockingCollection(System::Collections::Concurrent::IProducerConsumerCollection<T> ^ collection, int boundedCapacity);
public BlockingCollection (System.Collections.Concurrent.IProducerConsumerCollection<T> collection, int boundedCapacity);
Public Sub New (collection As IProducerConsumerCollection(Of T), boundedCapacity As Integer)
Parameters
collection
IProducerConsumerCollection<T> IProducerConsumerCollection<T> IProducerConsumerCollection<T>

The collection to use as the underlying data store.

boundedCapacity
Int32 Int32 Int32

The bounded size of the collection.

Exceptions

The supplied collection contains more values than is permitted by boundedCapacity.

Applies to