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

◆ LinkTo() [1/2]

Definition at line 242 of file WriteOnceBlock.cs.

243 {
244 if (target == null)
245 {
246 throw new ArgumentNullException("target");
247 }
248 if (linkOptions == null)
249 {
250 throw new ArgumentNullException("linkOptions");
251 }
252 bool hasValue;
254 {
255 hasValue = HasValue;
257 if (!hasValue && !completionReserved)
258 {
260 return Common.CreateUnlinker<T>(ValueLock, _targetRegistry, target);
261 }
262 }
263 if (hasValue)
264 {
265 bool consumeToAccept = _cloningFunction != null;
267 }
268 if (linkOptions.PropagateCompletion)
269 {
271 }
272 return Disposables.Nop;
273 }
void Add(TKey key, TValue value)
static void PropagateCompletionOnceCompleted(Task sourceCompletionTask, IDataflowBlock target)
Definition Common.cs:357
readonly TargetRegistry< T > _targetRegistry
DataflowMessageStatus OfferMessage(DataflowMessageHeader messageHeader, TInput messageValue, ISourceBlock< TInput >? source, bool consumeToAccept)

References System.Threading.Tasks.Dataflow.WriteOnceBlock< T >._cloningFunction, System.Threading.Tasks.Dataflow.WriteOnceBlock< T >._completionReserved, System.Threading.Tasks.Dataflow.WriteOnceBlock< T >._header, System.Threading.Tasks.Dataflow.WriteOnceBlock< T >._targetRegistry, System.Threading.Tasks.Dataflow.WriteOnceBlock< T >._value, System.Collections.Generic.Dictionary< TKey, TValue >.Add(), System.Threading.Tasks.Dataflow.WriteOnceBlock< T >.Completion, System.Threading.Tasks.Dataflow.WriteOnceBlock< T >.HasValue, System.Threading.Tasks.Dataflow.Internal.Disposables.Nop, System.Threading.Tasks.Dataflow.Internal.Common.PropagateCompletionOnceCompleted(), and System.Threading.Tasks.Dataflow.WriteOnceBlock< T >.ValueLock.