BlockingCollection<T> コンストラクター

定義

上限を指定せずに、BlockingCollection<T> クラスの新しいインスタンスを初期化します。

オーバーロード

BlockingCollection<T>()

上限を指定せずに、BlockingCollection<T> クラスの新しいインスタンスを初期化します。

BlockingCollection<T>(IProducerConsumerCollection<T>)

上限を指定せずに、指定した BlockingCollection<T> を基になるデータ ストアとして使用して、IProducerConsumerCollection<T> クラスの新しいインスタンスを初期化します。

BlockingCollection<T>(Int32)

上限を指定して、BlockingCollection<T> クラスの新しいインスタンスを初期化します。

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

上限を指定し、指定した BlockingCollection<T> を基になるデータ ストアとして使用して、IProducerConsumerCollection<T> クラスの新しいインスタンスを初期化します。

BlockingCollection<T>()

上限を指定せずに、BlockingCollection<T> クラスの新しいインスタンスを初期化します。

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

注釈

既定の基になるコレクションは ConcurrentQueue<T> オブジェクトであり、先入れ先出し (FIFO) 動作を提供します。

こちらもご覧ください

適用対象

BlockingCollection<T>(IProducerConsumerCollection<T>)

上限を指定せずに、指定した BlockingCollection<T> を基になるデータ ストアとして使用して、IProducerConsumerCollection<T> クラスの新しいインスタンスを初期化します。

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))

パラメーター

collection
IProducerConsumerCollection<T>

基になるデータ ストアとして使用するコレクション。

例外

collection 引数が null です。

こちらもご覧ください

適用対象

BlockingCollection<T>(Int32)

上限を指定して、BlockingCollection<T> クラスの新しいインスタンスを初期化します。

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)

パラメーター

boundedCapacity
Int32

コレクションのサイズの制限。

例外

boundedCapacity は正の値ではありません。

注釈

基になる既定のコレクションは です ConcurrentQueue<T>

こちらもご覧ください

適用対象

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

上限を指定し、指定した BlockingCollection<T> を基になるデータ ストアとして使用して、IProducerConsumerCollection<T> クラスの新しいインスタンスを初期化します。

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)

パラメーター

collection
IProducerConsumerCollection<T>

基になるデータ ストアとして使用するコレクション。

boundedCapacity
Int32

コレクションのサイズの制限。

例外

collection 引数が null です。

boundedCapacity は正の値ではありません。

指定された collection に、boundedCapacity によって許可されているよりも多い値が含まれています。

こちらもご覧ください

適用対象