共用方式為


BroadcastBlock<T>.IReceivableSourceBlock<T>.TryReceiveAll 方法

定義

嘗試以同步方式從 IReceivableSourceBlock<TOutput> 接收所有可用項目。

 virtual bool System.Threading.Tasks.Dataflow.IReceivableSourceBlock<T>.TryReceiveAll([Runtime::InteropServices::Out] System::Collections::Generic::IList<T> ^ % items) = System::Threading::Tasks::Dataflow::IReceivableSourceBlock<T>::TryReceiveAll;
bool IReceivableSourceBlock<T>.TryReceiveAll (out System.Collections.Generic.IList<T> items);
abstract member System.Threading.Tasks.Dataflow.IReceivableSourceBlock<T>.TryReceiveAll : IList -> bool
override this.System.Threading.Tasks.Dataflow.IReceivableSourceBlock<T>.TryReceiveAll : IList -> bool
Function TryReceiveAll (ByRef items As IList(Of T)) As Boolean Implements IReceivableSourceBlock(Of T).TryReceiveAll

參數

items
IList<T>

從來源接收的項目。

傳回

如果無法收到一或多個項目,則為 true,否則為false

備註

此方法不會封鎖等候來源提供專案。

它會在檢查項目之後傳回,不論專案是否可用。

適用於