Bruteflow 1.0.0

Suggested Alternatives

Bruteflow 1.3.1

There is a newer version of this package available.
See the version list below for details.
The owner has unlisted this package. This could mean that the package is deprecated, has security vulnerabilities or shouldn't be used anymore.
dotnet add package Bruteflow --version 1.0.0                
NuGet\Install-Package Bruteflow -Version 1.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="Bruteflow" Version="1.0.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Bruteflow --version 1.0.0                
#r "nuget: Bruteflow, 1.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.
// Install Bruteflow as a Cake Addin
#addin nuget:?package=Bruteflow&version=1.0.0

// Install Bruteflow as a Cake Tool
#tool nuget:?package=Bruteflow&version=1.0.0                

Publish NuGet Package

Bruteflow

Simple synchronous pipeline builder which supports well-known flowchart blocks (start, process, decision) and enhance them with additional blocks: distribute and batch. This is no way a replcement for Dataflow (Task Parallel Library). It uses another approach for building a pipeline.

Blocks

Any Bruteflow pipeline starts with HeadBlock block and ends with ActionBlock. Bruteflow with its extension methods help to build DAG pipeline.

The execution of the pipeline is synchroneous, but code inside blocks may be asynchroneous .

HeadBlock

Starting block of a pipeline. You can push data or specify a method which will produce series of data.

You need to specify a type which will be produced by the block.

ProcessBlock

The block receives and produces data. Type of incoming and outcoming data may be different.

DecisionBlock

The block which uses condition to route data to different branches. You need to specify the condition and use head or processing blocks to propogate data in the pipeline.

DistributeBlock

The block which broadcast incoming data to all following blocks which has been linked. Every following block will recevie same data.

BatchBlock

The block has internal state and stores data in bunches. In order to propogate data when batch is incomplete, you ned to flush the pipeline. Flushing will prpogate internal data further in the pipeline and clear internal states.

ActionBlock

The final block of the pipeline. It doesn't propogate and should be used as an ending block of the pipeline.

Examples

The construction of a pipeline with batch block, pushing values into the pipeline and reading results.

var result = new List<string>();

var head = new HeadBlock<string>();
head.Process((str, md) => str + "A")
	.Batch(3)
	.Process((str, md) => string.Join(',', str))
	.Action((str, md) => result.Add(str));

head.Push("C", new PipelineMetadata());
head.Push("C", new PipelineMetadata());
head.Push("C", new PipelineMetadata());
// this one will be lost because of the batching
head.Push("C", new PipelineMetadata());
head.Flush();

result.Count.Should().Be(2);
result[0].Should().Be("CA,CA,CA");
result[1].Should().Be("CA");

More examples you can find in tests. Also you will find there similar tests written with Dataflow (Task Parallel Library)

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  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. 
.NET Core netcoreapp3.1 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETCoreApp 3.1

    • No dependencies.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Bruteflow:

Package Downloads
Bruteflow.Kafka

Package Description

GitHub repositories

This package is not used by any popular GitHub repositories.