WinstonPuckett.PipeExtensions
1.0.0
Prefix Reserved
See the version list below for details.
dotnet add package WinstonPuckett.PipeExtensions --version 1.0.0
NuGet\Install-Package WinstonPuckett.PipeExtensions -Version 1.0.0
<PackageReference Include="WinstonPuckett.PipeExtensions" Version="1.0.0" />
paket add WinstonPuckett.PipeExtensions --version 1.0.0
#r "nuget: WinstonPuckett.PipeExtensions, 1.0.0"
// Install WinstonPuckett.PipeExtensions as a Cake Addin #addin nuget:?package=WinstonPuckett.PipeExtensions&version=1.0.0 // Install WinstonPuckett.PipeExtensions as a Cake Tool #tool nuget:?package=WinstonPuckett.PipeExtensions&version=1.0.0
Create an object(s) to operate on.
You need some form of starting object to pipe. This can be any class. For our example, we'll just create an Input object with an Id and an Output model with a Name.
Example:
public class Input
{
public int Id { get; set; }
}
public class Output
{
public string Name { get; set; }
}
Create methods which takes the object as an input.
Now that we have an object, we
public Input Validate(Input input)
{
if (input < 0)
throw new Exception("Id cannot be less than 0.");
return input
}
public Output Transform(Input input)
{
// In the real world, you would do something meaningful.
return new Output()
{
Name = $"My name is input.Id"
};
}
public void Submit(Output output)
{
// In the real world, you would submit to a database or something.
}
Call .Pipe on the input and work through the user flow.
Now that we have data and methods to operate on that data, we can string this together into a "meaningful" user flow.
public void ExecuteUserFlow(Input input)
{
input
.Pipe(Validate)
.Pipe(Transform)
.Pipe(Submit);
}
Extra information
If you want to learn about how to use async methods with pipe extensions or why PipeExtensions was created, visit the page on GitHub.
Product | Versions 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. |
-
.NETStandard 2.0
- No dependencies.
NuGet packages (2)
Showing the top 2 NuGet packages that depend on WinstonPuckett.PipeExtensions:
Package | Downloads |
---|---|
RamDrive.OsfMount
A library for create virtual disk drive on system memory using (c) PassMark OSFMount software. |
|
Krimson.Persistence.MongoDB
.NET toolkit for Kafka |
GitHub repositories
This package is not used by any popular GitHub repositories.
Add all pipe operations and tests.