PipelinePattern 2.0.0

dotnet add package PipelinePattern --version 2.0.0
NuGet\Install-Package PipelinePattern -Version 2.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="PipelinePattern" Version="2.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add PipelinePattern --version 2.0.0
#r "nuget: PipelinePattern, 2.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 PipelinePattern as a Cake Addin
#addin nuget:?package=PipelinePattern&version=2.0.0

// Install PipelinePattern as a Cake Tool
#tool nuget:?package=PipelinePattern&version=2.0.0

Check out series of articles with explanation and code examples: https://dev.to/rwasik/series/15982

Pipeline pattern without intermittent flow:

  • create pipeline model class,
  • create pipeline steps by implementing IPipeStep<TPipeModel> interface,
  • create Factory which implements IPipeFactory<TPipeModel> interface,
  • inject IPipeService<TPipeModel> into Factory (use IoC container to return PipeService<TPipeModel> when resolving IPipeService<TPipeModel>),
  • in Factory.CreatePipe() method, using injected IPipeService<TPipeModel>, add all steps into pipe service (optionally add error steps as well),
  • in some specific Service, inject your pipeline Factory,
  • in specific method in your Service, initiate pipeline model, create pipeline using CreatePipe() method from Factory and execute pipeline.

Usage examples:


Pipeline pattern with intermittent flow:

  • it allows to define 'In Message' step to read message from queue,
  • it allows to define 'Out Message' step to send message to different queue,
  • it is terminated after sending message out,
  • it allows to continue from certain step after receiving response.

How to create it:

  • create pipeline model class which implements IInQueuePipeModel and optionally IOutQueuePipeModel interface,
  • create 'In Message' steps by implementing IInQueuePipeStep<TPipeModel> interface,
  • create 'Out Message' steps by implementing IOutQueuePipeStep<TPipeModel> interface,
  • create regular steps by implementing IPipeStep<TPipeModel> interface,
  • create Factory which implements IPipeFactory<TPipeModel> interface,
  • inject IPipeService<TPipeModel> into Factory (use IoC container to return QueuePipeService<TPipeModel> when resolving IPipeService<TPipeModel>),
  • in Factory.CreatePipe() method, using injected IPipeService<TPipeModel>, add all steps into pipe service (optionally add error steps as well),
  • in some specific Service, inject your pipeline Factory,
  • in specific method in your Service, initiate pipeline model, create pipeline using CreatePipe() method from Factory and execute pipeline.

ExecuteAsync method from QueuePipeService<TPipeModel> works in a way that until it finds step which implements IInQueuePipeStep interface and queue name for such step is equal to queue name passed in pipe model it will be skipping steps. From the matching step it gets all next steps but if one of them implements IOutQueuePipeStep, it is going to be an indication that after this step some request message is going to be sent out and pipeline will be terminated until receiving response.

Usage examples:

All examples together:

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 netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETStandard 2.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
2.0.0 697 1/6/2022
1.0.0 2,436 4/27/2021