1 interface inheriting from ITargetBlock
System.Threading.Tasks.Dataflow (1)
Base\IPropagatorBlock.cs (1)
18public interface IPropagatorBlock<in TInput, out TOutput> : ITargetBlock<TInput>, ISourceBlock<TOutput>
7 implementations of ITargetBlock
System.Threading.Tasks.Dataflow (7)
Base\DataflowBlock.cs (4)
1136private sealed class ReceiveTarget<T> : TaskCompletionSource<T>, ITargetBlock<T>, IDebuggerDisplay 1485private sealed class OutputAvailableAsyncTarget<T> : TaskCompletionSource<bool>, ITargetBlock<T>, IDebuggerDisplay 2142private sealed class ChooseTarget<T> : TaskCompletionSource<T>, ITargetBlock<T>, IDebuggerDisplay 2692private sealed class NullTargetBlock<TInput> : ITargetBlock<TInput>
Blocks\ActionBlock.cs (1)
25public sealed class ActionBlock<TInput> : ITargetBlock<TInput>, IDebuggerDisplay
Blocks\BatchedJoinBlock.cs (1)
533internal sealed class BatchedJoinBlockTarget<T> : ITargetBlock<T>, IDebuggerDisplay
Blocks\JoinBlock.cs (1)
486internal sealed class JoinBlockTarget<T> : JoinBlockTargetBase, ITargetBlock<T>, IDebuggerDisplay
184 references to ITargetBlock
System.Threading.Tasks.Dataflow (184)
Base\DataflowBlock.cs (46)
27/// <summary>Links the <see cref="ISourceBlock{TOutput}"/> to the specified <see cref="ITargetBlock{TOutput}"/>.</summary> 29/// <param name="target">The <see cref="ITargetBlock{TOutput}"/> to which to connect the source.</param> 35ITargetBlock<TOutput> target) 51/// <summary>Links the <see cref="ISourceBlock{TOutput}"/> to the specified <see cref="ITargetBlock{TOutput}"/> using the specified filter.</summary> 53/// <param name="target">The <see cref="ITargetBlock{TOutput}"/> to which to connect the source.</param> 61ITargetBlock<TOutput> target, 68/// <summary>Links the <see cref="ISourceBlock{TOutput}"/> to the specified <see cref="ITargetBlock{TOutput}"/> using the specified filter.</summary> 70/// <param name="target">The <see cref="ITargetBlock{TOutput}"/> to which to connect the source.</param> 80ITargetBlock<TOutput> target, 116private readonly ITargetBlock<T> _target; 124internal FilteredLinkPropagator(ISourceBlock<T> source, ITargetBlock<T> target, Predicate<T> predicate) 148DataflowMessageStatus ITargetBlock<T>.OfferMessage(DataflowMessageHeader messageHeader, T messageValue, ISourceBlock<T>? source, bool consumeToAccept) 169T? ISourceBlock<T>.ConsumeMessage(DataflowMessageHeader messageHeader, ITargetBlock<T> target, out bool messageConsumed) 178bool ISourceBlock<T>.ReserveMessage(DataflowMessageHeader messageHeader, ITargetBlock<T> target) 187void ISourceBlock<T>.ReleaseReservation(DataflowMessageHeader messageHeader, ITargetBlock<T> target) 203IDisposable ISourceBlock<T>.LinkTo(ITargetBlock<T> target, DataflowLinkOptions linkOptions) { throw new NotSupportedException(SR.NotSupported_MemberNotNeeded); } 233public ITargetBlock<T> LinkedTarget { get { return _filter._target; } } 239/// <summary>Posts an item to the <see cref="System.Threading.Tasks.Dataflow.ITargetBlock{T}"/>.</summary> 251/// <see cref="System.Threading.Tasks.Dataflow.DataflowBlock.SendAsync{TInput}(ITargetBlock{TInput}, TInput)">SendAsync</see>, 255public static bool Post<TInput>(this ITargetBlock<TInput> target, TInput item) 280public static Task<bool> SendAsync<TInput>(this ITargetBlock<TInput> target, TInput item) 307public static Task<bool> SendAsync<TInput>(this ITargetBlock<TInput> target, TInput item, CancellationToken cancellationToken) 372private readonly ITargetBlock<TOutput> _target; 412internal SendAsyncSource(ITargetBlock<TOutput> target, TOutput messageValue, CancellationToken cancellationToken) 642TOutput? ISourceBlock<TOutput>.ConsumeMessage(DataflowMessageHeader messageHeader, ITargetBlock<TOutput> target, out bool messageConsumed) 687bool ISourceBlock<TOutput>.ReserveMessage(DataflowMessageHeader messageHeader, ITargetBlock<TOutput> target) 704void ISourceBlock<TOutput>.ReleaseReservation(DataflowMessageHeader messageHeader, ITargetBlock<TOutput> target) 736IDisposable ISourceBlock<TOutput>.LinkTo(ITargetBlock<TOutput> target, DataflowLinkOptions linkOptions) { throw new NotSupportedException(SR.NotSupported_MemberNotNeeded); } 769public ITargetBlock<TOutput> Target { get { return _source._target; } } 1179DataflowMessageStatus ITargetBlock<T>.OfferMessage(DataflowMessageHeader messageHeader, T messageValue, ISourceBlock<T>? source, bool consumeToAccept) 1493DataflowMessageStatus ITargetBlock<T>.OfferMessage(DataflowMessageHeader messageHeader, T messageValue, ISourceBlock<T>? source, bool consumeToAccept) 1543ITargetBlock<TInput> target, ISourceBlock<TOutput> source) 1563private readonly ITargetBlock<TInput> _target; 1567public EncapsulatingPropagator(ITargetBlock<TInput> target, ISourceBlock<TOutput> source) 1601public IDisposable LinkTo(ITargetBlock<TOutput> target, DataflowLinkOptions linkOptions) 1627public TOutput? ConsumeMessage(DataflowMessageHeader messageHeader, ITargetBlock<TOutput> target, out bool messageConsumed) 1633public bool ReserveMessage(DataflowMessageHeader messageHeader, ITargetBlock<TOutput> target) 1639public void ReleaseReservation(DataflowMessageHeader messageHeader, ITargetBlock<TOutput> target) 1672public ITargetBlock<TInput> Target { get { return _propagator._target; } } 2602/// <summary>Creates a new <see cref="System.IObserver{TInput}"/> abstraction over the <see cref="ITargetBlock{TInput}"/>.</summary> 2606public static IObserver<TInput> AsObserver<TInput>(this ITargetBlock<TInput> target) 2621private readonly ITargetBlock<TInput> _target; 2625internal TargetObserver(ITargetBlock<TInput> target) 2682/// <returns>A <see cref="System.Threading.Tasks.Dataflow.ITargetBlock{T}"/> that accepts and subsequently drops all offered messages.</returns> 2683public static ITargetBlock<TInput> NullTarget<TInput>() 2697DataflowMessageStatus ITargetBlock<TInput>.OfferMessage(DataflowMessageHeader messageHeader, TInput messageValue, ISourceBlock<TInput>? source, bool consumeToAccept)
Base\DataflowMessageStatus.cs (6)
19/// Indicates that the <see cref="ITargetBlock{TInput}"/> accepted the message. Once a target has accepted a message, 25/// Indicates that the <see cref="ITargetBlock{TInput}"/> declined the message. The <see cref="ISourceBlock{TOutput}"/> still owns the message. 30/// Indicates that the <see cref="ITargetBlock{TInput}"/> postponed the message for potential consumption at a later time. 36/// Indicates that the <see cref="ITargetBlock{TInput}"/> tried to accept the message from the <see cref="ISourceBlock{TOutput}"/>, but the 42/// Indicates that the <see cref="ITargetBlock{TInput}"/> declined the message. The <see cref="ISourceBlock{TOutput}"/> still owns the message. 43/// Additionally, the <see cref="ITargetBlock{TInput}"/> will decline all future messages sent by the source.
Base\ISourceBlock.cs (4)
25IDisposable LinkTo(ITargetBlock<TOutput> target, DataflowLinkOptions linkOptions); 30TOutput? ConsumeMessage(DataflowMessageHeader messageHeader, ITargetBlock<TOutput> target, out bool messageConsumed); 33bool ReserveMessage(DataflowMessageHeader messageHeader, ITargetBlock<TOutput> target); 36void ReleaseReservation(DataflowMessageHeader messageHeader, ITargetBlock<TOutput> target);
Base\ITargetBlock.cs (1)
16/// <typeparam name="TInput">Specifies the type of data accepted by the <see cref="ITargetBlock{TInput}"/>.</typeparam>
Blocks\ActionBlock.cs (3)
262/// <summary>Posts an item to the <see cref="System.Threading.Tasks.Dataflow.ITargetBlock{T}"/>.</summary> 272/// <see cref="System.Threading.Tasks.Dataflow.DataflowBlock.SendAsync{TInput}(ITargetBlock{TInput}, TInput)">SendAsync</see>, 290DataflowMessageStatus ITargetBlock<TInput>.OfferMessage(DataflowMessageHeader messageHeader, TInput messageValue, ISourceBlock<TInput>? source, bool consumeToAccept)
Blocks\BatchBlock.cs (6)
124public IDisposable LinkTo(ITargetBlock<T[]> target, DataflowLinkOptions linkOptions) 152DataflowMessageStatus ITargetBlock<T>.OfferMessage(DataflowMessageHeader messageHeader, T messageValue, ISourceBlock<T>? source, bool consumeToAccept) 158T[]? ISourceBlock<T[]>.ConsumeMessage(DataflowMessageHeader messageHeader, ITargetBlock<T[]> target, out bool messageConsumed) 164bool ISourceBlock<T[]>.ReserveMessage(DataflowMessageHeader messageHeader, ITargetBlock<T[]> target) 170void ISourceBlock<T[]>.ReleaseReservation(DataflowMessageHeader messageHeader, ITargetBlock<T[]> target) 236public ITargetBlock<T[]>? NextMessageReservedFor { get { return _sourceDebuggingInformation.NextMessageReservedFor; } }
Blocks\BatchedJoinBlock.cs (20)
120public ITargetBlock<T1> Target1 { get { return _target1; } } 123public ITargetBlock<T2> Target2 { get { return _target2; } } 126public IDisposable LinkTo(ITargetBlock<Tuple<IList<T1>, IList<T2>>> target, DataflowLinkOptions linkOptions) 177DataflowMessageHeader messageHeader, ITargetBlock<Tuple<IList<T1>, IList<T2>>> target, out bool messageConsumed) 184DataflowMessageHeader messageHeader, ITargetBlock<Tuple<IList<T1>, IList<T2>>> target) 191DataflowMessageHeader messageHeader, ITargetBlock<Tuple<IList<T1>, IList<T2>>> target) 245public ITargetBlock<T1> Target1 { get { return _batchedJoinBlock._target1; } } 247public ITargetBlock<T2> Target2 { get { return _batchedJoinBlock._target2; } } 262public ITargetBlock<Tuple<IList<T1>, IList<T2>>>? NextMessageReservedFor { get { return _sourceDebuggingInformation.NextMessageReservedFor; } } 372public ITargetBlock<T1> Target1 { get { return _target1; } } 375public ITargetBlock<T2> Target2 { get { return _target2; } } 378public ITargetBlock<T3> Target3 { get { return _target3; } } 381public IDisposable LinkTo(ITargetBlock<Tuple<IList<T1>, IList<T2>, IList<T3>>> target, DataflowLinkOptions linkOptions) 434DataflowMessageHeader messageHeader, ITargetBlock<Tuple<IList<T1>, IList<T2>, IList<T3>>> target, out bool messageConsumed) 441DataflowMessageHeader messageHeader, ITargetBlock<Tuple<IList<T1>, IList<T2>, IList<T3>>> target) 448DataflowMessageHeader messageHeader, ITargetBlock<Tuple<IList<T1>, IList<T2>, IList<T3>>> target) 503public ITargetBlock<T1> Target1 { get { return _batchedJoinBlock._target1; } } 505public ITargetBlock<T2> Target2 { get { return _batchedJoinBlock._target2; } } 507public ITargetBlock<T3> Target3 { get { return _batchedJoinBlock._target3; } } 522public ITargetBlock<Tuple<IList<T1>, IList<T2>, IList<T3>>>? NextMessageReservedFor { get { return _sourceDebuggingInformation.NextMessageReservedFor; } }
Blocks\BroadcastBlock.cs (15)
154public IDisposable LinkTo(ITargetBlock<T> target, DataflowLinkOptions linkOptions) { return _source.LinkTo(target, linkOptions); } 166DataflowMessageStatus ITargetBlock<T>.OfferMessage(DataflowMessageHeader messageHeader, T messageValue, ISourceBlock<T>? source, bool consumeToAccept) 421T? ISourceBlock<T>.ConsumeMessage(DataflowMessageHeader messageHeader, ITargetBlock<T> target, out bool messageConsumed) 427bool ISourceBlock<T>.ReserveMessage(DataflowMessageHeader messageHeader, ITargetBlock<T> target) 433void ISourceBlock<T>.ReleaseReservation(DataflowMessageHeader messageHeader, ITargetBlock<T> target) 491public ITargetBlock<T>? NextMessageReservedFor { get { return _sourceDebuggingInformation.NextMessageReservedFor; } } 528private ITargetBlock<TOutput>? _nextMessageReservedFor; 672private void OfferCurrentMessageToNewTarget(ITargetBlock<TOutput> target) 773ITargetBlock<TOutput> target = cur.Target; 788private void OfferMessageToTarget(DataflowMessageHeader header, TOutput message, ITargetBlock<TOutput> target) 1009internal IDisposable LinkTo(ITargetBlock<TOutput> target, DataflowLinkOptions linkOptions) 1044internal TOutput? ConsumeMessage(DataflowMessageHeader messageHeader, ITargetBlock<TOutput> target, out bool messageConsumed) 1084internal bool ReserveMessage(DataflowMessageHeader messageHeader, ITargetBlock<TOutput> target) 1111internal void ReleaseReservation(DataflowMessageHeader messageHeader, ITargetBlock<TOutput> target) 1232public ITargetBlock<TOutput>? NextMessageReservedFor { get { return _source._nextMessageReservedFor; } }
Blocks\BufferBlock.cs (6)
91DataflowMessageStatus ITargetBlock<T>.OfferMessage(DataflowMessageHeader messageHeader, T messageValue, ISourceBlock<T>? source, bool consumeToAccept) 189public IDisposable LinkTo(ITargetBlock<T> target, DataflowLinkOptions linkOptions) { return _source.LinkTo(target, linkOptions); } 204T? ISourceBlock<T>.ConsumeMessage(DataflowMessageHeader messageHeader, ITargetBlock<T> target, out bool messageConsumed) 210bool ISourceBlock<T>.ReserveMessage(DataflowMessageHeader messageHeader, ITargetBlock<T> target) 216void ISourceBlock<T>.ReleaseReservation(DataflowMessageHeader messageHeader, ITargetBlock<T> target) 479public ITargetBlock<T>? NextMessageReservedFor { get { return _sourceDebuggingInformation.NextMessageReservedFor; } }
Blocks\JoinBlock.cs (21)
113public IDisposable LinkTo(ITargetBlock<Tuple<T1, T2>> target, DataflowLinkOptions linkOptions) 163public ITargetBlock<T1> Target1 { get { return _target1; } } 166public ITargetBlock<T2> Target2 { get { return _target2; } } 169Tuple<T1, T2>? ISourceBlock<Tuple<T1, T2>>.ConsumeMessage(DataflowMessageHeader messageHeader, ITargetBlock<Tuple<T1, T2>> target, out bool messageConsumed) 175bool ISourceBlock<Tuple<T1, T2>>.ReserveMessage(DataflowMessageHeader messageHeader, ITargetBlock<Tuple<T1, T2>> target) 181void ISourceBlock<Tuple<T1, T2>>.ReleaseReservation(DataflowMessageHeader messageHeader, ITargetBlock<Tuple<T1, T2>> target) 236public ITargetBlock<T1> Target1 { get { return _joinBlock._target1; } } 238public ITargetBlock<T2> Target2 { get { return _joinBlock._target2; } } 243public ITargetBlock<Tuple<T1, T2>>? NextMessageReservedFor { get { return _sourceDebuggingInformation.NextMessageReservedFor; } } 338public IDisposable LinkTo(ITargetBlock<Tuple<T1, T2, T3>> target, DataflowLinkOptions linkOptions) 390public ITargetBlock<T1> Target1 { get { return _target1; } } 393public ITargetBlock<T2> Target2 { get { return _target2; } } 396public ITargetBlock<T3> Target3 { get { return _target3; } } 399Tuple<T1, T2, T3>? ISourceBlock<Tuple<T1, T2, T3>>.ConsumeMessage(DataflowMessageHeader messageHeader, ITargetBlock<Tuple<T1, T2, T3>> target, out bool messageConsumed) 405bool ISourceBlock<Tuple<T1, T2, T3>>.ReserveMessage(DataflowMessageHeader messageHeader, ITargetBlock<Tuple<T1, T2, T3>> target) 411void ISourceBlock<Tuple<T1, T2, T3>>.ReleaseReservation(DataflowMessageHeader messageHeader, ITargetBlock<Tuple<T1, T2, T3>> target) 466public ITargetBlock<T1> Target1 { get { return _joinBlock._target1; } } 468public ITargetBlock<T2> Target2 { get { return _joinBlock._target2; } } 470public ITargetBlock<T3> Target3 { get { return _joinBlock._target3; } } 475public ITargetBlock<Tuple<T1, T2, T3>>? NextMessageReservedFor { get { return _sourceDebuggingInformation.NextMessageReservedFor; } } 826DataflowMessageStatus ITargetBlock<T>.OfferMessage(DataflowMessageHeader messageHeader, T messageValue, ISourceBlock<T>? source, bool consumeToAccept)
Blocks\TransformBlock.cs (6)
347public IDisposable LinkTo(ITargetBlock<TOutput> target, DataflowLinkOptions linkOptions) 371DataflowMessageStatus ITargetBlock<TInput>.OfferMessage(DataflowMessageHeader messageHeader, TInput messageValue, ISourceBlock<TInput>? source, bool consumeToAccept) 377TOutput? ISourceBlock<TOutput>.ConsumeMessage(DataflowMessageHeader messageHeader, ITargetBlock<TOutput> target, out bool messageConsumed) 383bool ISourceBlock<TOutput>.ReserveMessage(DataflowMessageHeader messageHeader, ITargetBlock<TOutput> target) 389void ISourceBlock<TOutput>.ReleaseReservation(DataflowMessageHeader messageHeader, ITargetBlock<TOutput> target) 453public ITargetBlock<TOutput>? NextMessageReservedFor { get { return _sourceDebuggingInformation.NextMessageReservedFor; } }
Blocks\TransformManyBlock.cs (6)
559public IDisposable LinkTo(ITargetBlock<TOutput> target, DataflowLinkOptions linkOptions) { return _source.LinkTo(target, linkOptions); } 577DataflowMessageStatus ITargetBlock<TInput>.OfferMessage(DataflowMessageHeader messageHeader, TInput messageValue, ISourceBlock<TInput>? source, bool consumeToAccept) 583TOutput? ISourceBlock<TOutput>.ConsumeMessage(DataflowMessageHeader messageHeader, ITargetBlock<TOutput> target, out bool messageConsumed) 589bool ISourceBlock<TOutput>.ReserveMessage(DataflowMessageHeader messageHeader, ITargetBlock<TOutput> target) 595void ISourceBlock<TOutput>.ReleaseReservation(DataflowMessageHeader messageHeader, ITargetBlock<TOutput> target) 659public ITargetBlock<TOutput>? NextMessageReservedFor { get { return _sourceDebuggingInformation.NextMessageReservedFor; } }
Blocks\WriteOnceBlock.cs (6)
303public IDisposable LinkTo(ITargetBlock<T> target, DataflowLinkOptions linkOptions) 347DataflowMessageStatus ITargetBlock<T>.OfferMessage(DataflowMessageHeader messageHeader, T messageValue, ISourceBlock<T>? source, bool consumeToAccept) 387T? ISourceBlock<T>.ConsumeMessage(DataflowMessageHeader messageHeader, ITargetBlock<T> target, out bool messageConsumed) 408bool ISourceBlock<T>.ReserveMessage(DataflowMessageHeader messageHeader, ITargetBlock<T> target) 421void ISourceBlock<T>.ReleaseReservation(DataflowMessageHeader messageHeader, ITargetBlock<T> target) 467ITargetBlock<T> target = cur.Target;
Internal\Common.cs (3)
405internal static IDisposable CreateUnlinker<TOutput>(object outgoingLock, TargetRegistry<TOutput> targetRegistry, ITargetBlock<TOutput> targetBlock) 497internal static void ReleaseAllPostponedMessages<T>(ITargetBlock<T> target, 601internal static readonly Action<object, TargetRegistry<T>, ITargetBlock<T>> CreateUnlinkerShimAction =
Internal\DataflowEtwProvider.cs (2)
179internal void DataflowBlockLinking<T>(ISourceBlock<T> source, ITargetBlock<T> target) 201internal void DataflowBlockUnlinking<T>(ISourceBlock<T> source, ITargetBlock<T> target)
Internal\SourceCore.cs (8)
83private ITargetBlock<TOutput>? _nextMessageReservedFor; // protected by OutgoingLock 124internal IDisposable LinkTo(ITargetBlock<TOutput> target, DataflowLinkOptions linkOptions) 163internal TOutput? ConsumeMessage(DataflowMessageHeader messageHeader, ITargetBlock<TOutput> target, out bool messageConsumed) 219internal bool ReserveMessage(DataflowMessageHeader messageHeader, ITargetBlock<TOutput> target) 246internal void ReleaseReservation(DataflowMessageHeader messageHeader, ITargetBlock<TOutput> target) 541private bool OfferToTargets(ITargetBlock<TOutput>? linkToTarget = null) 670DataflowMessageHeader header, TOutput message, ITargetBlock<TOutput> target, 1022internal ITargetBlock<TOutput>? NextMessageReservedFor { get { return _source._nextMessageReservedFor; } }
Internal\SpscTargetCore.cs (3)
40/// Provides a core implementation of <see cref="ITargetBlock{TInput}"/> for use when there's only a single producer posting data. 47private readonly ITargetBlock<TInput> _owningTarget; 75ITargetBlock<TInput> owningTarget, Action<TInput> action, ExecutionDataflowBlockOptions dataflowBlockOptions)
Internal\TargetCore.cs (3)
43/// Provides a core implementation of <see cref="ITargetBlock{TInput}"/>.</summary> 63private readonly ITargetBlock<TInput> _owningTarget; 107ITargetBlock<TInput> owningTarget,
Internal\TargetRegistry.cs (19)
35internal LinkedTargetInfo(ITargetBlock<T> target, DataflowLinkOptions linkOptions) 46internal readonly ITargetBlock<T> Target; 62private readonly Dictionary<ITargetBlock<T>, LinkedTargetInfo> _targetInformation; 77_targetInformation = new Dictionary<ITargetBlock<T>, LinkedTargetInfo>(); 83internal void Add(ref ITargetBlock<T> target, DataflowLinkOptions linkOptions) 109internal bool Contains(ITargetBlock<T> target) 119internal void Remove(ITargetBlock<T> target, bool onlyIfReachedMaxMessages = false) 136private void Remove_Slow(ITargetBlock<T> target, bool onlyIfReachedMaxMessages) 280private ITargetBlock<T>[] TargetsForDebugger 284var targets = new ITargetBlock<T>[Count]; 305private readonly ITargetBlock<T> _target; 310internal NopLinkPropagator(ISourceBlock<T> owningSource, ITargetBlock<T> target) 321DataflowMessageStatus ITargetBlock<T>.OfferMessage(DataflowMessageHeader messageHeader, T messageValue, ISourceBlock<T>? source, bool consumeToAccept) 328T? ISourceBlock<T>.ConsumeMessage(DataflowMessageHeader messageHeader, ITargetBlock<T> target, out bool messageConsumed) 334bool ISourceBlock<T>.ReserveMessage(DataflowMessageHeader messageHeader, ITargetBlock<T> target) 340void ISourceBlock<T>.ReleaseReservation(DataflowMessageHeader messageHeader, ITargetBlock<T> target) 353IDisposable ISourceBlock<T>.LinkTo(ITargetBlock<T> target, DataflowLinkOptions linkOptions) { throw new NotSupportedException(SR.NotSupported_MemberNotNeeded); } 383public ITargetBlock<T> LinkedTarget { get { return _passthrough._target; } } 404public ITargetBlock<T>[] Targets { get { return _registry.TargetsForDebugger; } }