Table of Contents

Class AdmissionGateHooks

Namespace
CounterpointCollective.Dataflow
Assembly
Dataflow.Composable.dll

Hooks for controlling and observing admission into a block.

public record AdmissionGateHooks : IEquatable<AdmissionGateHooks>
Inheritance
AdmissionGateHooks
Implements
Inherited Members

Remarks

All hook callbacks are invoked serially: at most one hook method is executing at any given time. No hook is ever called concurrently with itself or with another hook.

Properties

Entering

A message is successfully entering the block. Allows you to commit state changes accordingly.

public Action? Entering { get; set; }

Property Value

Action

FailingToEnter

Although a message was allowed to enter, it failed to do so (e.g. because it could not be consumed from the source block). Allows you to roll back any state changes made in MayTryToEnter.

public Action? FailingToEnter { get; set; }

Property Value

Action

HasEntered

Called when a message has successfully entered the block, and after all state changes.

public Action? HasEntered { get; set; }

Property Value

Action

MayTryToEnter

When this returns true, always either Entering or FailingToEnter will be called afterwards.

public Func<bool>? MayTryToEnter { get; set; }

Property Value

Func<bool>