PipeEx 0.0.2
See the version list below for details.
dotnet add package PipeEx --version 0.0.2
NuGet\Install-Package PipeEx -Version 0.0.2
<PackageReference Include="PipeEx" Version="0.0.2" />
<PackageVersion Include="PipeEx" Version="0.0.2" />
<PackageReference Include="PipeEx" />
paket add PipeEx --version 0.0.2
#r "nuget: PipeEx, 0.0.2"
#:package PipeEx@0.0.2
#addin nuget:?package=PipeEx&version=0.0.2
#tool nuget:?package=PipeEx&version=0.0.2
PipeEx
PipeEx is a simple yet powerful library that provides extension methods for creating a fluent, pipe-like syntax in C#. It allows you to chain function calls together in a readable and expressive way, improving code clarity and maintainability.
What is it?
PipeEx introduces the I
(Infer) extension method, which acts as a "pipe" operator. This allows you to pass the result of one function directly as input to the next, creating a chain of operations. This is particularly useful when dealing with asynchronous operations or complex data transformations.
Usage
The core of PipeEx is the I
extension method.
public int Calc(int x) => x.I(FuncY)
.I(x => x + 2);
// await is handled automatically
public Task<int> Calc(int x) => x.I(FuncAsync)
.I(x => x + 2)
.I(FuncYAsync)
.I(Func);
// automatically destructuring of tules
public Task<int> Calc(int x) => x.I(x => x + 2, x => x + 4)
.I((x, y) => x y);
Features
- Fluent Syntax: Enables a clean and readable way to chain function calls.
- Asynchronous Support: Works seamlessly with both synchronous and asynchronous operations (Task<T>).
- Simplified Code: Reduces nesting and improves code maintainability.
- Lightweight: A small and focused library with minimal dependencies.
Contributing
Contributions are welcome! Feel free to submit pull requests or open issues.
Product | Versions 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 was computed. 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. |
-
net8.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.