Channel.CreateBounded Método
Definição
Importante
Algumas informações dizem respeito a um produto pré-lançado que pode ser substancialmente modificado antes de ser lançado. A Microsoft não faz garantias, de forma expressa ou implícita, em relação à informação aqui apresentada.
Sobrecargas
| Name | Description |
|---|---|
| CreateBounded<T>(Int32) |
Cria um canal com a capacidade máxima especificada. |
| CreateBounded<T>(BoundedChannelOptions) |
Cria um canal com a capacidade máxima especificada. |
| CreateBounded<T>(BoundedChannelOptions, Action<T>) |
Cria um canal sujeito às opções fornecidas. |
CreateBounded<T>(Int32)
- Origem:
- Channel.cs
- Origem:
- Channel.cs
- Origem:
- Channel.cs
- Origem:
- Channel.cs
- Origem:
- Channel.cs
- Origem:
- Channel.cs
Cria um canal com a capacidade máxima especificada.
public:
generic <typename T>
static System::Threading::Channels::Channel<T> ^ CreateBounded(int capacity);
public static System.Threading.Channels.Channel<T> CreateBounded<T>(int capacity);
static member CreateBounded : int -> System.Threading.Channels.Channel<'T>
Public Shared Function CreateBounded(Of T) (capacity As Integer) As Channel(Of T)
Parâmetros de Tipo Genérico
- T
Especifica o tipo de dados no canal.
Parâmetros
- capacity
- Int32
O número máximo de itens que o canal pode armazenar.
Devoluções
O canal criado.
Exceções
capacity é negativo.
Observações
Os canais criados com este método aplicam o Wait comportamento e proíbem que continuações corram de forma síncrona.
Aplica-se a
CreateBounded<T>(BoundedChannelOptions)
- Origem:
- Channel.cs
- Origem:
- Channel.cs
- Origem:
- Channel.cs
- Origem:
- Channel.cs
- Origem:
- Channel.cs
- Origem:
- Channel.cs
Cria um canal com a capacidade máxima especificada.
public:
generic <typename T>
static System::Threading::Channels::Channel<T> ^ CreateBounded(System::Threading::Channels::BoundedChannelOptions ^ options);
public static System.Threading.Channels.Channel<T> CreateBounded<T>(System.Threading.Channels.BoundedChannelOptions options);
static member CreateBounded : System.Threading.Channels.BoundedChannelOptions -> System.Threading.Channels.Channel<'T>
Public Shared Function CreateBounded(Of T) (options As BoundedChannelOptions) As Channel(Of T)
Parâmetros de Tipo Genérico
- T
Especifica o tipo de dados no canal.
Parâmetros
- options
- BoundedChannelOptions
Opções que orientam o comportamento do canal.
Devoluções
O canal criado.
Exceções
options é null.
Aplica-se a
CreateBounded<T>(BoundedChannelOptions, Action<T>)
- Origem:
- Channel.cs
- Origem:
- Channel.cs
- Origem:
- Channel.cs
- Origem:
- Channel.cs
- Origem:
- Channel.cs
- Origem:
- Channel.cs
Cria um canal sujeito às opções fornecidas.
public:
generic <typename T>
static System::Threading::Channels::Channel<T> ^ CreateBounded(System::Threading::Channels::BoundedChannelOptions ^ options, Action<T> ^ itemDropped);
public static System.Threading.Channels.Channel<T> CreateBounded<T>(System.Threading.Channels.BoundedChannelOptions options, Action<T>? itemDropped);
static member CreateBounded : System.Threading.Channels.BoundedChannelOptions * Action<'T> -> System.Threading.Channels.Channel<'T>
Public Shared Function CreateBounded(Of T) (options As BoundedChannelOptions, itemDropped As Action(Of T)) As Channel(Of T)
Parâmetros de Tipo Genérico
- T
Especifica o tipo de dados no canal.
Parâmetros
- options
- BoundedChannelOptions
Opções que orientam o comportamento do canal.
- itemDropped
- Action<T>
Delegar que será chamado quando o item for abandonado do canal. Consulte BoundedChannelFullMode.
Devoluções
O canal criado.
Exceções
options é null.