4 instantiations of DataflowMessageHeader
System.Threading.Tasks.Dataflow (4)
Blocks\BroadcastBlock.cs (2)
693
DataflowMessageStatus result = target.OfferMessage(new
DataflowMessageHeader
(_nextMessageId), currentMessage!, _owningSource, consumeToAccept: useCloning);
748
header = new
DataflowMessageHeader
(++_nextMessageId);
Internal\Common.cs (1)
34
internal static readonly DataflowMessageHeader SingleMessageHeader = new
DataflowMessageHeader
(SINGLE_MESSAGE_ID);
Internal\SourceCore.cs (1)
568
header = new
DataflowMessageHeader
(_nextMessageId.Value);
164 references to DataflowMessageHeader
System.Threading.Tasks.Dataflow (164)
Base\DataflowBlock.cs (15)
148
DataflowMessageStatus ITargetBlock<T>.OfferMessage(
DataflowMessageHeader
messageHeader, T messageValue, ISourceBlock<T>? source, bool consumeToAccept)
169
T? ISourceBlock<T>.ConsumeMessage(
DataflowMessageHeader
messageHeader, ITargetBlock<T> target, out bool messageConsumed)
178
bool ISourceBlock<T>.ReserveMessage(
DataflowMessageHeader
messageHeader, ITargetBlock<T> target)
187
void ISourceBlock<T>.ReleaseReservation(
DataflowMessageHeader
messageHeader, ITargetBlock<T> target)
642
TOutput? ISourceBlock<TOutput>.ConsumeMessage(
DataflowMessageHeader
messageHeader, ITargetBlock<TOutput> target, out bool messageConsumed)
687
bool ISourceBlock<TOutput>.ReserveMessage(
DataflowMessageHeader
messageHeader, ITargetBlock<TOutput> target)
704
void ISourceBlock<TOutput>.ReleaseReservation(
DataflowMessageHeader
messageHeader, ITargetBlock<TOutput> target)
1179
DataflowMessageStatus ITargetBlock<T>.OfferMessage(
DataflowMessageHeader
messageHeader, T messageValue, ISourceBlock<T>? source, bool consumeToAccept)
1493
DataflowMessageStatus ITargetBlock<T>.OfferMessage(
DataflowMessageHeader
messageHeader, T messageValue, ISourceBlock<T>? source, bool consumeToAccept)
1592
public DataflowMessageStatus OfferMessage(
DataflowMessageHeader
messageHeader, TInput messageValue, ISourceBlock<TInput>? source, bool consumeToAccept)
1627
public TOutput? ConsumeMessage(
DataflowMessageHeader
messageHeader, ITargetBlock<TOutput> target, out bool messageConsumed)
1633
public bool ReserveMessage(
DataflowMessageHeader
messageHeader, ITargetBlock<TOutput> target)
1639
public void ReleaseReservation(
DataflowMessageHeader
messageHeader, ITargetBlock<TOutput> target)
2180
public DataflowMessageStatus OfferMessage(
DataflowMessageHeader
messageHeader, T messageValue, ISourceBlock<T>? source, bool consumeToAccept)
2697
DataflowMessageStatus ITargetBlock<TInput>.OfferMessage(
DataflowMessageHeader
messageHeader, TInput messageValue, ISourceBlock<TInput>? source, bool consumeToAccept)
Base\DataflowMessageHeader.cs (21)
21
public readonly struct DataflowMessageHeader : IEquatable<
DataflowMessageHeader
>
26
/// <summary>Initializes the <see cref="
DataflowMessageHeader
"/> with the specified attributes.</summary>
40
/// <returns>The ID contained in the <see cref="
DataflowMessageHeader
"/> instance.</returns>
49
/// <summary>Checks two <see cref="
DataflowMessageHeader
"/> instances for equality by ID without boxing.</summary>
50
/// <param name="other">Another <see cref="
DataflowMessageHeader
"/> instance.</param>
52
public bool Equals(
DataflowMessageHeader
other)
57
/// <summary>Checks boxed <see cref="
DataflowMessageHeader
"/> instances for equality by ID.</summary>
58
/// <param name="obj">A boxed <see cref="
DataflowMessageHeader
"/> instance.</param>
62
return obj is
DataflowMessageHeader
&& this == (
DataflowMessageHeader
)obj;
65
/// <summary>Generates a hash code for the <see cref="
DataflowMessageHeader
"/> instance.</summary>
72
/// <summary>Checks two <see cref="
DataflowMessageHeader
"/> instances for equality by ID.</summary>
73
/// <param name="left">A <see cref="
DataflowMessageHeader
"/> instance.</param>
74
/// <param name="right">A <see cref="
DataflowMessageHeader
"/> instance.</param>
76
public static bool operator ==(
DataflowMessageHeader
left,
DataflowMessageHeader
right)
81
/// <summary>Checks two <see cref="
DataflowMessageHeader
"/> instances for non-equality by ID.</summary>
82
/// <param name="left">A <see cref="
DataflowMessageHeader
"/> instance.</param>
83
/// <param name="right">A <see cref="
DataflowMessageHeader
"/> instance.</param>
85
public static bool operator !=(
DataflowMessageHeader
left,
DataflowMessageHeader
right)
Base\DataflowMessageStatus.cs (1)
15
/// <summary>Represents the status of a <see cref="
DataflowMessageHeader
"/> when passed between dataflow blocks.</summary>
Base\ISourceBlock.cs (3)
30
TOutput? ConsumeMessage(
DataflowMessageHeader
messageHeader, ITargetBlock<TOutput> target, out bool messageConsumed);
33
bool ReserveMessage(
DataflowMessageHeader
messageHeader, ITargetBlock<TOutput> target);
36
void ReleaseReservation(
DataflowMessageHeader
messageHeader, ITargetBlock<TOutput> target);
Base\ITargetBlock.cs (1)
22
DataflowMessageStatus OfferMessage(
DataflowMessageHeader
messageHeader, TInput messageValue, ISourceBlock<TInput>? source, bool consumeToAccept);
Blocks\ActionBlock.cs (2)
290
DataflowMessageStatus ITargetBlock<TInput>.OfferMessage(
DataflowMessageHeader
messageHeader, TInput messageValue, ISourceBlock<TInput>? source, bool consumeToAccept)
354
public QueuedMap<ISourceBlock<TInput>,
DataflowMessageHeader
>? PostponedMessages
Blocks\BatchBlock.cs (48)
152
DataflowMessageStatus ITargetBlock<T>.OfferMessage(
DataflowMessageHeader
messageHeader, T messageValue, ISourceBlock<T>? source, bool consumeToAccept)
158
T[]? ISourceBlock<T[]>.ConsumeMessage(
DataflowMessageHeader
messageHeader, ITargetBlock<T[]> target, out bool messageConsumed)
164
bool ISourceBlock<T[]>.ReserveMessage(
DataflowMessageHeader
messageHeader, ITargetBlock<T[]> target)
170
void ISourceBlock<T[]>.ReleaseReservation(
DataflowMessageHeader
messageHeader, ITargetBlock<T[]> target)
232
public QueuedMap<ISourceBlock<T>,
DataflowMessageHeader
>? PostponedMessages { get { return _targetDebuggingInformation.PostponedMessages; } }
275
internal readonly QueuedMap<ISourceBlock<T>,
DataflowMessageHeader
> PostponedMessages;
277
internal readonly KeyValuePair<ISourceBlock<T>,
DataflowMessageHeader
>[] PostponedMessagesTemp;
279
internal readonly List<KeyValuePair<ISourceBlock<T>, KeyValuePair<
DataflowMessageHeader
, T>>> ReservedSourcesTemp;
294
PostponedMessages = new QueuedMap<ISourceBlock<T>,
DataflowMessageHeader
>(batchSize);
295
PostponedMessagesTemp = new KeyValuePair<ISourceBlock<T>,
DataflowMessageHeader
>[batchSize];
296
ReservedSourcesTemp = new List<KeyValuePair<ISourceBlock<T>, KeyValuePair<
DataflowMessageHeader
, T>>>(batchSize);
352
internal DataflowMessageStatus OfferMessage(
DataflowMessageHeader
messageHeader, T messageValue, ISourceBlock<T>? source, bool consumeToAccept)
760
QueuedMap<ISourceBlock<T>,
DataflowMessageHeader
> postponed = _nonGreedyState.PostponedMessages;
761
KeyValuePair<ISourceBlock<T>,
DataflowMessageHeader
>[] postponedTemp = _nonGreedyState.PostponedMessagesTemp;
762
List<KeyValuePair<ISourceBlock<T>, KeyValuePair<
DataflowMessageHeader
, T>>> reserved = _nonGreedyState.ReservedSourcesTemp;
792
KeyValuePair<ISourceBlock<T>,
DataflowMessageHeader
> sourceAndMessage = postponedTemp[i];
795
var reservedMessage = new KeyValuePair<
DataflowMessageHeader
, T>(sourceAndMessage.Value, default(T)!);
796
var reservedSourceAndMessage = new KeyValuePair<ISourceBlock<T>, KeyValuePair<
DataflowMessageHeader
, T>>(sourceAndMessage.Key, reservedMessage);
806
KeyValuePair<ISourceBlock<T>,
DataflowMessageHeader
> sourceAndMessage;
813
var reservedMessage = new KeyValuePair<
DataflowMessageHeader
, T>(sourceAndMessage.Value, default(T)!);
814
var reservedSourceAndMessage = new KeyValuePair<ISourceBlock<T>, KeyValuePair<
DataflowMessageHeader
, T>>(sourceAndMessage.Key, reservedMessage);
878
QueuedMap<ISourceBlock<T>,
DataflowMessageHeader
> postponed = _nonGreedyState.PostponedMessages;
879
KeyValuePair<ISourceBlock<T>,
DataflowMessageHeader
>[] postponedTemp = _nonGreedyState.PostponedMessagesTemp;
880
List<KeyValuePair<ISourceBlock<T>, KeyValuePair<
DataflowMessageHeader
, T>>> reserved = _nonGreedyState.ReservedSourcesTemp;
909
KeyValuePair<ISourceBlock<T>,
DataflowMessageHeader
> sourceAndMessage = postponedTemp[i];
910
var reservedMessage = new KeyValuePair<
DataflowMessageHeader
, T>(sourceAndMessage.Value, default(T)!);
911
var reservedSourceAndMessage = new KeyValuePair<ISourceBlock<T>, KeyValuePair<
DataflowMessageHeader
, T>>(sourceAndMessage.Key, reservedMessage);
920
KeyValuePair<ISourceBlock<T>,
DataflowMessageHeader
> sourceAndMessage;
926
var reservedMessage = new KeyValuePair<
DataflowMessageHeader
, T>(sourceAndMessage.Value, default(T)!);
927
var reservedSourceAndMessage = new KeyValuePair<ISourceBlock<T>, KeyValuePair<
DataflowMessageHeader
, T>>(sourceAndMessage.Key, reservedMessage);
987
List<KeyValuePair<ISourceBlock<T>, KeyValuePair<
DataflowMessageHeader
, T>>> reserved = _nonGreedyState.ReservedSourcesTemp;
996
KeyValuePair<ISourceBlock<T>, KeyValuePair<
DataflowMessageHeader
, T>> sourceAndMessage = reserved[i];
997
reserved[i] = default(KeyValuePair<ISourceBlock<T>, KeyValuePair<
DataflowMessageHeader
, T>>); // in case of exception from ConsumeMessage
1005
for (int prev = 0; prev < i; prev++) reserved[prev] = default(KeyValuePair<ISourceBlock<T>, KeyValuePair<
DataflowMessageHeader
, T>>);
1009
var consumedMessage = new KeyValuePair<
DataflowMessageHeader
, T>(sourceAndMessage.Value.Key, consumedValue!);
1010
var consumedSourceAndMessage = new KeyValuePair<ISourceBlock<T>, KeyValuePair<
DataflowMessageHeader
, T>>(sourceAndMessage.Key, consumedMessage);
1019
foreach (KeyValuePair<ISourceBlock<T>, KeyValuePair<
DataflowMessageHeader
, T>> sourceAndMessage in reserved)
1039
List<KeyValuePair<ISourceBlock<T>, KeyValuePair<
DataflowMessageHeader
, T>>> reserved = _nonGreedyState.ReservedSourcesTemp;
1048
KeyValuePair<ISourceBlock<T>, KeyValuePair<
DataflowMessageHeader
, T>> sourceAndMessage = reserved[i];
1049
reserved[i] = default(KeyValuePair<ISourceBlock<T>, KeyValuePair<
DataflowMessageHeader
, T>>); // in case of exception from ConsumeMessage
1054
var consumedMessage = new KeyValuePair<
DataflowMessageHeader
, T>(sourceAndMessage.Value.Key, consumedValue!);
1055
var consumedSourceAndMessage = new KeyValuePair<ISourceBlock<T>, KeyValuePair<
DataflowMessageHeader
, T>>(sourceAndMessage.Key, consumedMessage);
1068
foreach (KeyValuePair<ISourceBlock<T>, KeyValuePair<
DataflowMessageHeader
, T>> sourceAndMessage in reserved)
1091
List<KeyValuePair<ISourceBlock<T>, KeyValuePair<
DataflowMessageHeader
, T>>> reserved = _nonGreedyState.ReservedSourcesTemp;
1094
KeyValuePair<ISourceBlock<T>, KeyValuePair<
DataflowMessageHeader
, T>> sourceAndMessage = reserved[i];
1095
reserved[i] = default(KeyValuePair<ISourceBlock<T>, KeyValuePair<
DataflowMessageHeader
, T>>);
1097
KeyValuePair<
DataflowMessageHeader
, T> message = sourceAndMessage.Value;
1184
public QueuedMap<ISourceBlock<T>,
DataflowMessageHeader
>? PostponedMessages { get { return _target._nonGreedyState?.PostponedMessages; } }
Blocks\BatchedJoinBlock.cs (7)
177
DataflowMessageHeader
messageHeader, ITargetBlock<Tuple<IList<T1>, IList<T2>>> target, out bool messageConsumed)
184
DataflowMessageHeader
messageHeader, ITargetBlock<Tuple<IList<T1>, IList<T2>>> target)
191
DataflowMessageHeader
messageHeader, ITargetBlock<Tuple<IList<T1>, IList<T2>>> target)
434
DataflowMessageHeader
messageHeader, ITargetBlock<Tuple<IList<T1>, IList<T2>, IList<T3>>> target, out bool messageConsumed)
441
DataflowMessageHeader
messageHeader, ITargetBlock<Tuple<IList<T1>, IList<T2>, IList<T3>>> target)
448
DataflowMessageHeader
messageHeader, ITargetBlock<Tuple<IList<T1>, IList<T2>, IList<T3>>> target)
570
public DataflowMessageStatus OfferMessage(
DataflowMessageHeader
messageHeader, T messageValue, ISourceBlock<T>? source, bool consumeToAccept)
Blocks\BroadcastBlock.cs (11)
166
DataflowMessageStatus ITargetBlock<T>.OfferMessage(
DataflowMessageHeader
messageHeader, T messageValue, ISourceBlock<T>? source, bool consumeToAccept)
341
KeyValuePair<ISourceBlock<T>,
DataflowMessageHeader
> sourceAndMessage;
421
T? ISourceBlock<T>.ConsumeMessage(
DataflowMessageHeader
messageHeader, ITargetBlock<T> target, out bool messageConsumed)
427
bool ISourceBlock<T>.ReserveMessage(
DataflowMessageHeader
messageHeader, ITargetBlock<T> target)
433
void ISourceBlock<T>.ReleaseReservation(
DataflowMessageHeader
messageHeader, ITargetBlock<T> target)
720
DataflowMessageHeader
header = default(
DataflowMessageHeader
);
788
private void OfferMessageToTarget(
DataflowMessageHeader
header, TOutput message, ITargetBlock<TOutput> target)
1044
internal TOutput? ConsumeMessage(
DataflowMessageHeader
messageHeader, ITargetBlock<TOutput> target, out bool messageConsumed)
1084
internal bool ReserveMessage(
DataflowMessageHeader
messageHeader, ITargetBlock<TOutput> target)
1111
internal void ReleaseReservation(
DataflowMessageHeader
messageHeader, ITargetBlock<TOutput> target)
Blocks\BufferBlock.cs (6)
91
DataflowMessageStatus ITargetBlock<T>.OfferMessage(
DataflowMessageHeader
messageHeader, T messageValue, ISourceBlock<T>? source, bool consumeToAccept)
204
T? ISourceBlock<T>.ConsumeMessage(
DataflowMessageHeader
messageHeader, ITargetBlock<T> target, out bool messageConsumed)
210
bool ISourceBlock<T>.ReserveMessage(
DataflowMessageHeader
messageHeader, ITargetBlock<T> target)
216
void ISourceBlock<T>.ReleaseReservation(
DataflowMessageHeader
messageHeader, ITargetBlock<T> target)
343
KeyValuePair<ISourceBlock<T>,
DataflowMessageHeader
> sourceAndMessage;
454
public QueuedMap<ISourceBlock<T>,
DataflowMessageHeader
>? PostponedMessages
Blocks\JoinBlock.cs (14)
169
Tuple<T1, T2>? ISourceBlock<Tuple<T1, T2>>.ConsumeMessage(
DataflowMessageHeader
messageHeader, ITargetBlock<Tuple<T1, T2>> target, out bool messageConsumed)
175
bool ISourceBlock<Tuple<T1, T2>>.ReserveMessage(
DataflowMessageHeader
messageHeader, ITargetBlock<Tuple<T1, T2>> target)
181
void ISourceBlock<Tuple<T1, T2>>.ReleaseReservation(
DataflowMessageHeader
messageHeader, ITargetBlock<Tuple<T1, T2>> target)
399
Tuple<T1, T2, T3>? ISourceBlock<Tuple<T1, T2, T3>>.ConsumeMessage(
DataflowMessageHeader
messageHeader, ITargetBlock<Tuple<T1, T2, T3>> target, out bool messageConsumed)
405
bool ISourceBlock<Tuple<T1, T2, T3>>.ReserveMessage(
DataflowMessageHeader
messageHeader, ITargetBlock<Tuple<T1, T2, T3>> target)
411
void ISourceBlock<Tuple<T1, T2, T3>>.ReleaseReservation(
DataflowMessageHeader
messageHeader, ITargetBlock<Tuple<T1, T2, T3>> target)
503
internal readonly QueuedMap<ISourceBlock<T>,
DataflowMessageHeader
> PostponedMessages = new QueuedMap<ISourceBlock<T>,
DataflowMessageHeader
>();
505
internal KeyValuePair<ISourceBlock<T>,
DataflowMessageHeader
> ReservedMessage;
615
KeyValuePair<ISourceBlock<T>,
DataflowMessageHeader
> next;
660
_nonGreedy.ReservedMessage = default(KeyValuePair<ISourceBlock<T>,
DataflowMessageHeader
>);
702
KeyValuePair<ISourceBlock<T>,
DataflowMessageHeader
> next;
782
_nonGreedy.ReservedMessage = default(KeyValuePair<ISourceBlock<T>,
DataflowMessageHeader
>);
826
DataflowMessageStatus ITargetBlock<T>.OfferMessage(
DataflowMessageHeader
messageHeader, T messageValue, ISourceBlock<T>? source, bool consumeToAccept)
Blocks\TransformBlock.cs (5)
371
DataflowMessageStatus ITargetBlock<TInput>.OfferMessage(
DataflowMessageHeader
messageHeader, TInput messageValue, ISourceBlock<TInput>? source, bool consumeToAccept)
377
TOutput? ISourceBlock<TOutput>.ConsumeMessage(
DataflowMessageHeader
messageHeader, ITargetBlock<TOutput> target, out bool messageConsumed)
383
bool ISourceBlock<TOutput>.ReserveMessage(
DataflowMessageHeader
messageHeader, ITargetBlock<TOutput> target)
389
void ISourceBlock<TOutput>.ReleaseReservation(
DataflowMessageHeader
messageHeader, ITargetBlock<TOutput> target)
432
public QueuedMap<ISourceBlock<TInput>,
DataflowMessageHeader
>? PostponedMessages { get { return _targetDebuggingInformation.PostponedMessages; } }
Blocks\TransformManyBlock.cs (5)
577
DataflowMessageStatus ITargetBlock<TInput>.OfferMessage(
DataflowMessageHeader
messageHeader, TInput messageValue, ISourceBlock<TInput>? source, bool consumeToAccept)
583
TOutput? ISourceBlock<TOutput>.ConsumeMessage(
DataflowMessageHeader
messageHeader, ITargetBlock<TOutput> target, out bool messageConsumed)
589
bool ISourceBlock<TOutput>.ReserveMessage(
DataflowMessageHeader
messageHeader, ITargetBlock<TOutput> target)
595
void ISourceBlock<TOutput>.ReleaseReservation(
DataflowMessageHeader
messageHeader, ITargetBlock<TOutput> target)
638
public QueuedMap<ISourceBlock<TInput>,
DataflowMessageHeader
>? PostponedMessages { get { return _targetDebuggingInformation.PostponedMessages; } }
Blocks\WriteOnceBlock.cs (5)
40
private
DataflowMessageHeader
_header;
347
DataflowMessageStatus ITargetBlock<T>.OfferMessage(
DataflowMessageHeader
messageHeader, T messageValue, ISourceBlock<T>? source, bool consumeToAccept)
387
T? ISourceBlock<T>.ConsumeMessage(
DataflowMessageHeader
messageHeader, ITargetBlock<T> target, out bool messageConsumed)
408
bool ISourceBlock<T>.ReserveMessage(
DataflowMessageHeader
messageHeader, ITargetBlock<T> target)
421
void ISourceBlock<T>.ReleaseReservation(
DataflowMessageHeader
messageHeader, ITargetBlock<T> target)
Internal\Common.cs (5)
34
internal static readonly
DataflowMessageHeader
SingleMessageHeader = new DataflowMessageHeader(SINGLE_MESSAGE_ID);
498
QueuedMap<ISourceBlock<T>,
DataflowMessageHeader
> postponedMessages,
510
KeyValuePair<ISourceBlock<T>,
DataflowMessageHeader
> sourceAndMessage;
642
internal readonly QueuedMap<ISourceBlock<TInput>,
DataflowMessageHeader
> PostponedMessages =
643
new QueuedMap<ISourceBlock<TInput>,
DataflowMessageHeader
>();
Internal\SourceCore.cs (6)
163
internal TOutput? ConsumeMessage(
DataflowMessageHeader
messageHeader, ITargetBlock<TOutput> target, out bool messageConsumed)
219
internal bool ReserveMessage(
DataflowMessageHeader
messageHeader, ITargetBlock<TOutput> target)
246
internal void ReleaseReservation(
DataflowMessageHeader
messageHeader, ITargetBlock<TOutput> target)
551
DataflowMessageHeader
header = default(
DataflowMessageHeader
);
670
DataflowMessageHeader
header, TOutput message, ITargetBlock<TOutput> target,
Internal\SpscTargetCore.cs (2)
111
internal DataflowMessageStatus OfferMessage(
DataflowMessageHeader
messageHeader, TInput messageValue, ISourceBlock<TInput>? source, bool consumeToAccept)
125
private DataflowMessageStatus OfferMessage_Slow(
DataflowMessageHeader
messageHeader, TInput messageValue, ISourceBlock<TInput>? source, bool consumeToAccept)
Internal\TargetCore.cs (3)
181
internal DataflowMessageStatus OfferMessage(
DataflowMessageHeader
messageHeader, TInput messageValue, ISourceBlock<TInput>? source, bool consumeToAccept)
625
KeyValuePair<ISourceBlock<TInput>,
DataflowMessageHeader
> element;
859
internal QueuedMap<ISourceBlock<TInput>,
DataflowMessageHeader
>? PostponedMessages
Internal\TargetRegistry.cs (4)
321
DataflowMessageStatus ITargetBlock<T>.OfferMessage(
DataflowMessageHeader
messageHeader, T messageValue, ISourceBlock<T>? source, bool consumeToAccept)
328
T? ISourceBlock<T>.ConsumeMessage(
DataflowMessageHeader
messageHeader, ITargetBlock<T> target, out bool messageConsumed)
334
bool ISourceBlock<T>.ReserveMessage(
DataflowMessageHeader
messageHeader, ITargetBlock<T> target)
340
void ISourceBlock<T>.ReleaseReservation(
DataflowMessageHeader
messageHeader, ITargetBlock<T> target)