Table of Contents

Class TokenGateBlock<T>

Namespace
CounterpointCollective.Dataflow
Assembly
Dataflow.Composable.dll
public class TokenGateBlock<T> : AbstractEncapsulatedTargetBlock<T>, ITargetBlock<T>, IDataflowBlock

Type Parameters

T
Inheritance
AbstractEncapsulatedDataflowBlock
AbstractEncapsulatedTargetBlock<T>
TokenGateBlock<T>
Implements
Inherited Members
Extension Methods

Constructors

TokenGateBlock(ITargetBlock<T>, Action<int>?)

public TokenGateBlock(ITargetBlock<T> inner, Action<int>? onTokenSpent = null)

Parameters

inner ITargetBlock<T>
onTokenSpent Action<int>

Properties

Tokens

Current amount of tokens still available.

public int Tokens { get; }

Property Value

int

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

count int