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

◆ BufferBlock() [2/2]

Definition at line 90 of file BufferBlock.cs.

91 {
92 if (dataflowBlockOptions == null)
93 {
94 throw new ArgumentNullException("dataflowBlockOptions");
95 }
98 if (dataflowBlockOptions.BoundedCapacity > 0)
99 {
101 {
102 ((BufferBlock<T>)owningSource).OnItemsRemoved(count);
103 };
105 }
107 {
108 ((BufferBlock<T>)owningSource).Complete();
111 {
112 IDataflowBlock dataflowBlock = (BufferBlock<T>)state;
113 dataflowBlock.Fault(completed.Exception);
114 }, this, CancellationToken.None, Common.GetContinuationOptions() | TaskContinuationOptions.OnlyOnFaulted, TaskScheduler.Default);
116 {
117 ((BufferBlock<T>)owningSource).Complete();
118 }, this);
120 if (log.IsEnabled())
121 {
122 log.DataflowBlockCreated(this, dataflowBlockOptions);
123 }
124 }
readonly BoundingStateWithPostponedAndTask< T > _boundingState
static TaskContinuationOptions GetContinuationOptions(TaskContinuationOptions toInclude=TaskContinuationOptions.None)
Definition Common.cs:262
static void WireCancellationToComplete(CancellationToken cancellationToken, Task completionTask, Action< object > completeAction, object completeState)
Definition Common.cs:93
Task ContinueWith(Action< Task< TResult > > continuationAction)
Definition Task.cs:263

References System.Threading.Tasks.Dataflow.BufferBlock< T >._boundingState, System.Threading.Tasks.Dataflow.BufferBlock< T >._source, System.Threading.Tasks.Dataflow.Internal.SourceCore< TOutput >.Completion, System.Threading.Tasks.Task< TResult >.ContinueWith(), System.count, System.Threading.Tasks.TaskScheduler.Default, System.Threading.Tasks.Dataflow.Internal.Common.GetContinuationOptions(), System.Threading.Tasks.Dataflow.Internal.DataflowEtwProvider.Log, System.Threading.CancellationToken.None, System.state, and System.Threading.Tasks.Dataflow.Internal.Common.WireCancellationToComplete().