FluxFlow.Components.Expectations 3.0.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package FluxFlow.Components.Expectations --version 3.0.0
                    
NuGet\Install-Package FluxFlow.Components.Expectations -Version 3.0.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="FluxFlow.Components.Expectations" Version="3.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="FluxFlow.Components.Expectations" Version="3.0.0" />
                    
Directory.Packages.props
<PackageReference Include="FluxFlow.Components.Expectations" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add FluxFlow.Components.Expectations --version 3.0.0
                    
#r "nuget: FluxFlow.Components.Expectations, 3.0.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package FluxFlow.Components.Expectations@3.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=FluxFlow.Components.Expectations&version=3.0.0
                    
Install as a Cake Addin
#tool nuget:?package=FluxFlow.Components.Expectations&version=3.0.0
                    
Install as a Cake Tool

FluxFlow.Components.Expectations

A standalone event-expectation node for FluxFlow.

What it is

EventExpectationNode is a self-contained TPL Dataflow processor built on the FluxFlow.Nodes kit. You give it options, post ProjectionEvents to its input, and it resolves exactly once into a single EventExpectationResult broadcast on its output (failures on the error port, diagnostics on the event port). It needs nothing else — no engine, registry, or runtime:

await using var node = new EventExpectationNode(new EventExpectationOptions
{
    Kind = EventExpectationNodeKind.Expect,
    Name = "order-completed",
    TimeoutMilliseconds = 5000,
    Filter = new EventFilter
    {
        Type = "operation.completed",
        Status = "ok",
        SubjectPrefix = "orders/"
    }
});

node.Output.LinkTo(asserter.Input);  // broadcast: link to as many consumers as you like

await node.Input.SendAsync(FlowMessage.Create(@event));

An Expect node is satisfied when a matching event arrives; a Guard node is satisfied when none arrives. The node resolves on the first of three triggers:

  • a matching event,
  • a configured timeout (armed over the injected TimeProvider),
  • input completion via CompleteWithResultAsync().

Ports

Port Block Purpose
Input BufferBlock<FlowMessage<ProjectionEvent>> bounded intake — SendAsync applies backpressure
Output BroadcastBlock<FlowMessage<EventExpectationResult>> the single result, fanned out to every linked consumer
Errors BroadcastBlock<FlowError> evaluation failures
Events BroadcastBlock<FlowEvent> event.expectation.matched / .timed-out / .completed diagnostics

The result carries the correlation id of the matching event (or, on timeout and completion, the last observed event's id) so correlation flows event → result via the FlowMessage<T> envelope.

Result

EventExpectationResult includes:

  • evaluated timestamp
  • expectation name
  • expectation kind
  • satisfied flag
  • matched flag
  • timeout flag
  • matched event summary when one exists
  • recent observed event summaries
  • filter copy
  • reason text

Filters

Expectations use the same neutral EventFilter contract as the Projections package (the shared ProjectionEvent / EventFilter / EventFilterMatcher contracts come from FluxFlow.Components.Projections). Filters support:

  • event type or type prefix
  • subject prefix
  • channel prefix
  • excluded subject prefix
  • excluded channel prefix
  • status
  • source
  • source node id
  • component id through an event attribute named componentId
  • attribute key/value pairs
  • event timestamp range

Filters use ordinal string comparison.

Timing

Pass a TimeProvider to the constructor for deterministic timeout and result timestamps in tests or hosts. The timeout is armed via TimeProvider.CreateTimer, so a FakeTimeProvider drives it by advancing the clock — no real-time wait.

var node = new EventExpectationNode(options, timeProvider);

Composition

Building a workflow — reading config, creating nodes, linking them — is a separate concern from the node. This package is just the node; wire it from whatever composition/host layer you use.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on FluxFlow.Components.Expectations:

Package Downloads
FluxFlow.Components.Expectations.Composition

Canonical projection-event expectation registration and Designer metadata over exact host-owned clock addresses.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
7.0.0-rc.1 86 9/5/2026
6.0.0 181 8/3/2026
3.0.2 120 7/3/2026
3.0.1 176 7/2/2026
3.0.0 123 6/19/2026
2.0.0 125 6/18/2026
1.2.0 117 6/12/2026
1.1.0 128 6/12/2026
1.0.0 127 6/4/2026
0.1.0-alpha.1 73 6/3/2026

Rebuilt as a single standalone event-expectation node over the FluxFlow.Nodes kit: post FlowMessage<ProjectionEvent> in, one FlowMessage<EventExpectationResult> broadcast out, failures on the error port, diagnostics on the event port. The node resolves on the first of a matching event, a timeout armed over the injected TimeProvider, or input completion via CompleteWithResultAsync. The engine glue (node factory, module, registration extensions, component-type/port constants, JSON options reader, component-options/clock holder, and design-metadata provider) is removed; the node depends only on FluxFlow.Nodes and the shared FluxFlow.Components.Projections contracts (ProjectionEvent, EventFilter), and runs without the engine. ProjectionEvent replaces the engine FlowEvent as the standalone input contract; correlation flows event -> result via the envelope.