Class TokenGateBlock<T>
- Namespace
- CounterpointCollective.Dataflow
- Assembly
- Dataflow.Composable.dll
public class TokenGateBlock<T> : AbstractEncapsulatedTargetBlock<T>, ITargetBlock<T>, IDataflowBlock
Type Parameters
T
- Inheritance
-
AbstractEncapsulatedDataflowBlockAbstractEncapsulatedTargetBlock<T>TokenGateBlock<T>
- Implements
-
ITargetBlock<T>
- Inherited Members
- Extension Methods
Constructors
TokenGateBlock(ITargetBlock<T>, Action<int>?)
public TokenGateBlock(ITargetBlock<T> inner, Action<int>? onTokenSpent = null)
Parameters
innerITargetBlock<T>onTokenSpentAction<int>
Properties
Tokens
Current amount of tokens still available.
public int Tokens { get; }
Property Value
Methods
Allow(int)
Allow count new messages to be delivered (either synchronously or asynchronously) by the linked targets. /
public void Allow(int count = 1)
Parameters
countint