BlockingCollection<T> Konstruktorer

Definition

Initierar en ny instans av BlockingCollection<T> klassen utan en övre gräns.

Överlagringar

Name Description
BlockingCollection<T>()

Initierar en ny instans av BlockingCollection<T> klassen utan en övre gräns.

BlockingCollection<T>(IProducerConsumerCollection<T>)

Initierar en ny instans av BlockingCollection<T> klassen utan en övre gräns och använder den angivna IProducerConsumerCollection<T> som dess underliggande datalager.

BlockingCollection<T>(Int32)

Initierar en ny instans av BlockingCollection<T> klassen med angiven övre gräns.

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

Initierar en ny instans av BlockingCollection<T> klassen med den angivna övre gränsen och använder den angivna IProducerConsumerCollection<T> som dess underliggande datalager.

BlockingCollection<T>()

Initierar en ny instans av BlockingCollection<T> klassen utan en övre gräns.

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

Kommentarer

Den underliggande standardsamlingen är ett ConcurrentQueue<T> objekt som först in, först ut (FIFO) fungerar.

Se även

Gäller för

BlockingCollection<T>(IProducerConsumerCollection<T>)

Initierar en ny instans av BlockingCollection<T> klassen utan en övre gräns och använder den angivna IProducerConsumerCollection<T> som dess underliggande datalager.

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

Parametrar

collection
IProducerConsumerCollection<T>

Samlingen som ska användas som underliggande datalager.

Undantag

Argumentet collection är null.

Se även

Gäller för

BlockingCollection<T>(Int32)

Initierar en ny instans av BlockingCollection<T> klassen med angiven övre gräns.

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)

Parametrar

boundedCapacity
Int32

Samlingens avgränsade storlek.

Undantag

boundedCapacity är inte ett positivt värde.

Kommentarer

Den underliggande standardsamlingen är en ConcurrentQueue<T>.

Se även

Gäller för

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

Initierar en ny instans av BlockingCollection<T> klassen med den angivna övre gränsen och använder den angivna IProducerConsumerCollection<T> som dess underliggande datalager.

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)

Parametrar

collection
IProducerConsumerCollection<T>

Samlingen som ska användas som underliggande datalager.

boundedCapacity
Int32

Samlingens avgränsade storlek.

Undantag

Argumentet collection är null.

boundedCapacity är inte ett positivt värde.

Den angivna collection innehåller fler värden än vad som tillåts av boundedCapacity.

Se även

Gäller för