JoinBlock<T1,T2>.TryReceive(Predicate<Tuple<T1,T2>>, Tuple<T1,T2>) Método
Definição
Tentativas de receber assincronamente um item de saída disponível do IReceivableSourceBlock<TOutput>.Attempts to synchronously receive an available output item from the IReceivableSourceBlock<TOutput>.
public:
virtual bool TryReceive(Predicate<Tuple<T1, T2> ^> ^ filter, [Runtime::InteropServices::Out] Tuple<T1, T2> ^ % item);
public bool TryReceive (Predicate<Tuple<T1,T2>> filter, out Tuple<T1,T2> item);
public bool TryReceive (Predicate<Tuple<T1,T2>>? filter, out Tuple<T1,T2>? item);
abstract member TryReceive : Predicate<'T1 * 'T2> * Tuple -> bool
override this.TryReceive : Predicate<'T1 * 'T2> * Tuple -> bool
Public Function TryReceive (filter As Predicate(Of Tuple(Of T1, T2)), ByRef item As Tuple(Of T1, T2)) As Boolean
Parâmetros
O valor de predicado deve ser passado com êxito para ser recebido.The predicate value must successfully pass in order for it to be received. filter pode ser null, caso em que todos os itens passarão.filter may be null, in which case all items will pass.
- item
- Tuple<T1,T2>
O item recebido da origem.The item received from the source.
Retornos
true se foi possível receber um item; caso contrário, false.true if an item could be received; otherwise, false.
Comentários
Esse método não bloqueia a espera pela origem para fornecer um item.This method does not block waiting for the source to provide an item.
Ela retornará após a verificação de um elemento, independentemente de um elemento estar ou não disponível.It will return after checking for an element, whether or not an element was available.