IReceivableSourceBlock<TOutput>.TryReceiveAll(IList<TOutput>) 方法

定义

IReceivableSourceBlock<TOutput> 中尝试同步接收所有可用项。Attempts to synchronously receive all available items from the IReceivableSourceBlock<TOutput>.

public:
 bool TryReceiveAll([Runtime::InteropServices::Out] System::Collections::Generic::IList<TOutput> ^ % items);
public bool TryReceiveAll (out System.Collections.Generic.IList<TOutput> items);
public bool TryReceiveAll (out System.Collections.Generic.IList<TOutput>? items);
abstract member TryReceiveAll : IList -> bool
Public Function TryReceiveAll (ByRef items As IList(Of TOutput)) As Boolean

参数

items
IList<TOutput>

从源中接收的项。The items received from the source.

返回

Boolean

如果可以接收一个或多个项目,则为 true;否则为 falsetrue if one or more items could be received; otherwise, false.

注解

此方法不会阻止等待源提供项。This method does not block waiting for the source to provide an item.

它将在检查元素后返回,而不管元素是否可用。It will return after checking for elements, whether or not an element was available.

适用于