VersaTul.Pipeline.Infrastructure 1.0.22

Prefix Reserved
There is a newer version of this package available.
See the version list below for details.
dotnet add package VersaTul.Pipeline.Infrastructure --version 1.0.22                
NuGet\Install-Package VersaTul.Pipeline.Infrastructure -Version 1.0.22                
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="VersaTul.Pipeline.Infrastructure" Version="1.0.22" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add VersaTul.Pipeline.Infrastructure --version 1.0.22                
#r "nuget: VersaTul.Pipeline.Infrastructure, 1.0.22"                
#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 VersaTul.Pipeline.Infrastructure as a Cake Addin
#addin nuget:?package=VersaTul.Pipeline.Infrastructure&version=1.0.22

// Install VersaTul.Pipeline.Infrastructure as a Cake Tool
#tool nuget:?package=VersaTul.Pipeline.Infrastructure&version=1.0.22                

VersaTul Pipeline Infrastructure

VersaTul Pipeline Infrastructure offers a powerful and elegant solution for object processing and transformation. This project fully implements the Pipeline and Filter pattern in a generic and flexible manner, allowing you to efficiently apply a series of filters to convert objects into their desired state. Ideal for scenarios where complex processing sequences are needed, VersaTul Pipeline Infrastructure simplifies and enhances your development workflow with its intuitive design and robust capabilities.

Installation

To use VersaTul Pipeline Infrastructure, first install it using nuget:

PM> NuGet\Install-Package VersaTul.Pipeline.Infrastructure -Version latest

Usage

The library consists of two main components: IStep<TIn, TOut> and Pipeline<TIn, TOut>.

  • IStep<TIn, TOut> : A step represents the work to be done on a given input with the given return type. It has a single method:
TOut Execute (TIn input);
  • Pipeline<TIn, TOut> : IStep<TIn, TOut> : Represents an accumulative set of steps that can be performed on a given input. It has a single property:
Func<TIn, TOut> Step;

The library also provides a static class PipelineExtensions that contains extension methods for adding steps to objects and pipelines.

TOut AddStep<TIn, TOut> (this TIn input, IStep<T, U> step);

Example

The following code shows how to use nested pipelines to work with different types.

// Using nested pipeline to work with different types.
// Example pipeline with steps setup.
public class CompoundPipeline : Pipeline<int, string>
{
    public CompoundPipeline()
    {
        Step = input => input
            .AddStep(new AnInitialStep())
            .AddStep(new InnerPipeline()) //InnerPipeline used by CompoundPipeline
            .AddStep(new IntToStringStep())
            .AddStep(new DoSomethingWithAStringStep());
    }
}

// A Pipeline that's called by another pipeline.
public class InnerPipeline : Pipeline<string, int>
{
    public InnerPipeline()
    {
        Step = input => input
            .AddStep(new DoSomethingWithAnIntegerStep())
            .AddStep(new SomethingElseWithAnIntegerStep())
            .AddStep(new OptionalStep<int, int>(i => i > 5, new AddOneStep()));
    }
}

License

This project is licensed under the MIT License - see the LICENSE file for details.

Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  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 is compatible.  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 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 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net6.0

    • No dependencies.
  • net7.0

    • No dependencies.
  • net8.0

    • No dependencies.
  • net9.0

    • No dependencies.

NuGet packages (3)

Showing the top 3 NuGet packages that depend on VersaTul.Pipeline.Infrastructure:

Package Downloads
VersaTul.Extensions

The VersaTul Extensions project provides a variety of methods for manipulating arrays, performing conversions and other common functionalities.

VersaTul.Display.Attributes

The VersaTul Display Attributes project enables the ability to provide meta-data to the export engine for outputting collections as files. This package works with the Collection streamers package. Attributes can be applied to the properties of a collection data type in order to manipulate the outputted data.

VersaTul.Object.Converters

The VersaTul Object Converters project provides the ability to convert objects into key/value pairs dictionary stores. For example, converters can be used to convert instance of classes into a dictionary representation of the data from the class. This package works with the Collection streamers package.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.23 251 12/10/2024
1.0.22 159 12/7/2024
1.0.19 86 12/6/2024
1.0.14 1,005 2/25/2024
1.0.10 137 2/25/2024
1.0.9 124 2/25/2024
1.0.8 343 2/1/2024
1.0.7 753 1/15/2024
1.0.6 590 1/10/2024
1.0.5 985 7/22/2023