Terraria v1.4.4.9
Terraria source code documentation
All Classes Namespaces Files Functions Variables Enumerations Enumerator Properties Events Macros

◆ OfferToTargets()

List< Exception > System.Threading.Tasks.Dataflow.WriteOnceBlock< T >.OfferToTargets ( )
inlineprivate

Definition at line 374 of file WriteOnceBlock.cs.

375 {
376 List<Exception> list = null;
377 if (HasValue)
378 {
379 TargetRegistry<T>.LinkedTargetInfo linkedTargetInfo = _targetRegistry.FirstTargetNode;
380 while (linkedTargetInfo != null)
381 {
382 TargetRegistry<T>.LinkedTargetInfo next = linkedTargetInfo.Next;
383 ITargetBlock<T> target = linkedTargetInfo.Target;
384 try
385 {
386 bool consumeToAccept = _cloningFunction != null;
387 target.OfferMessage(_header, _value, this, consumeToAccept);
388 }
389 catch (Exception ex)
390 {
391 Common.StoreDataflowMessageValueIntoExceptionData(ex, _value);
393 }
394 linkedTargetInfo = next;
395 }
396 }
397 return list;
398 }
static void AddException([NotNull] ref List< Exception > list, Exception exception, bool unwrapInnerExceptions=false)
Definition Common.cs:183
readonly TargetRegistry< T > _targetRegistry

References System.Threading.Tasks.Dataflow.WriteOnceBlock< T >._cloningFunction, System.Threading.Tasks.Dataflow.WriteOnceBlock< T >._header, System.Threading.Tasks.Dataflow.WriteOnceBlock< T >._targetRegistry, System.Threading.Tasks.Dataflow.WriteOnceBlock< T >._value, System.Threading.Tasks.Dataflow.Internal.Common.AddException(), System.Threading.Tasks.Dataflow.WriteOnceBlock< T >.HasValue, and System.list.

Referenced by System.Threading.Tasks.Dataflow.WriteOnceBlock< T >.OfferToTargetsAndCompleteBlock().