Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ StoreOutputItemsReordered()

void System.Threading.Tasks.Dataflow.TransformManyBlock< TInput, TOutput >.StoreOutputItemsReordered ( long id,
IEnumerable< TOutput > item )
inlineprivate

Definition at line 285 of file TransformManyBlock.cs.

286 {
288 bool isBounded = target.IsBounded;
289 if (item == null)
290 {
292 if (isBounded)
293 {
294 target.ChangeBoundingCount(-1);
295 }
296 return;
297 }
298 IList<TOutput> list = item as TOutput[];
299 if (list == null)
300 {
302 }
303 if (list != null && isBounded)
304 {
306 }
307 bool? flag = _reorderingBuffer.AddItemIfNextAndTrusted(id, list, list != null);
308 if (!flag.HasValue)
309 {
310 return;
311 }
312 bool value = flag.Value;
313 List<TOutput> list2 = null;
314 try
315 {
316 if (value)
317 {
319 return;
320 }
321 if (list != null)
322 {
323 list2 = list.ToList();
324 return;
325 }
326 int count = 0;
327 try
328 {
329 list2 = item.ToList();
330 count = list2.Count;
331 }
332 finally
333 {
334 if (isBounded)
335 {
337 }
338 }
339 }
340 finally
341 {
342 _reorderingBuffer.AddItem(id, list2, list2 != null);
343 }
344 }
void AddItem(long id, TOutput item, bool itemIsValid)
bool? AddItemIfNextAndTrusted(long id, TOutput item, bool isTrusted)
readonly ReorderingBuffer< IEnumerable< TOutput > > _reorderingBuffer
void StoreOutputItemsNonReorderedWithIteration(IEnumerable< TOutput > outputItems)

References System.Threading.Tasks.Dataflow.TransformManyBlock< TInput, TOutput >._reorderingBuffer, System.Threading.Tasks.Dataflow.TransformManyBlock< TInput, TOutput >._target, System.Threading.Tasks.Dataflow.Internal.ReorderingBuffer< TOutput >.AddItem(), System.Threading.Tasks.Dataflow.Internal.ReorderingBuffer< TOutput >.AddItemIfNextAndTrusted(), System.count, System.Collections.Generic.Dictionary< TKey, TValue >.Count, System.item, System.list, System.Threading.Tasks.Dataflow.TransformManyBlock< TInput, TOutput >.StoreOutputItemsNonReorderedWithIteration(), System.Threading.Tasks.Dataflow.TransformManyBlock< TInput, TOutput >.UpdateBoundingCountWithOutputCount(), and System.value.

Referenced by System.Threading.Tasks.Dataflow.TransformManyBlock< TInput, TOutput >.StoreOutputItems().