BlockingCollection<T> 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>) 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) 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) 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.

See Also

BlockingCollection<T>(IProducerConsumerCollection<T>) 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);
new System.Collections.Concurrent.BlockingCollection<'T> : System.Collections.Concurrent.IProducerConsumerCollection<'T> -> System.Collections.Concurrent.BlockingCollection<'T>
Public Sub New (collection As IProducerConsumerCollection(Of T))
Parameters
Exceptions
See Also

BlockingCollection<T>(Int32) 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);
new System.Collections.Concurrent.BlockingCollection<'T> : int -> System.Collections.Concurrent.BlockingCollection<'T>
Public Sub New (boundedCapacity As Integer)
Parameters
boundedCapacity
Int32 Int32 Int32 Int32

The bounded size of the collection.

Exceptions

Remarks

The default underlying collection is a ConcurrentQueue<T>.

See Also

BlockingCollection<T>(IProducerConsumerCollection<T>, Int32) 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);
new System.Collections.Concurrent.BlockingCollection<'T> : System.Collections.Concurrent.IProducerConsumerCollection<'T> * int -> System.Collections.Concurrent.BlockingCollection<'T>
Public Sub New (collection As IProducerConsumerCollection(Of T), boundedCapacity As Integer)
Parameters
boundedCapacity
Int32 Int32 Int32 Int32

The bounded size of the collection.

Exceptions

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

See Also

Applies to