Skip to content

Commit

Permalink
Merge pull request #106 from J-Tech-Japan/103-nuget-image-has-not-shown
Browse files Browse the repository at this point in the history
Update to show image
  • Loading branch information
tomohisa authored Jul 26, 2024
2 parents 76dbe64 + 06f6c17 commit 55ac88c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -234,13 +234,13 @@ Railway Oriented Programming (ROP) is a functional programming pattern that faci

ResultBoxes supports ROP by providing chain method to connect functions and simply write error handling code.

![Simple ROP](https://github.com/J-Tech-Japan/ResultBoxes/raw/main/docs/images/SimpleRop.png)
![Simple ROP](https://raw.githubusercontent.com/J-Tech-Japan/ResultBoxes/main/docs/images/SimpleRop.png)

Like example below, you can use `Conveyor(nextFunction)` to method chain continuous functions.

It is like Result"Box" are carrying through Belt Conveyor and moving next checkpoint, at next checkpoint, contents will be adjusted and pack with different form, and also if error happens, it will convert to the Error Result.

![conveyor image](https://github.com/J-Tech-Japan/ResultBoxes/raw/main/docs/images/conveyer.jpg)
![conveyor image](https://raw.githubusercontent.com/J-Tech-Japan/ResultBoxes/main/docs/images/conveyer.jpg)

If first method , in example `Increment` returns Exception, following functions `Double` and `Triple` will not executed, it will be just passing Exception that returned by `Increment`. If first method returns value, second method, in this case `Double` will be execute, and if all three method succeed, `Main` method receive the result value. If any methods returns Exception Result, it will return Exception to the `Main` function.

Expand Down Expand Up @@ -427,7 +427,7 @@ internal class Program

We have cases that need to prepare 2 or more value and pass it to next function. One way to achieve this is, programmer make a wrapping function and gather two value in function and use railway to handle results. But ResultBoxes provide `CombineValue` methods, which follows first Result, run second function and instead of passing only last executed value, but both first value and second value together and pass it to third function.

![CombineValue](https://github.com/J-Tech-Japan/ResultBoxes/raw/main/docs/images/CombineValue.png)
![CombineValue](https://raw.githubusercontent.com/J-Tech-Japan/ResultBoxes/main/docs/images/CombineValue.png)

We provide
[TwoValues](https://github.com/J-Tech-Japan/ResultBoxes/blob/main/src/ResultBoxes/ResultBoxes/TwoValues.cs),
Expand Down
4 changes: 2 additions & 2 deletions src/ResultBoxes/ResultBoxes/ResultBoxes.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@
<RootNamespace>ResultBoxes</RootNamespace>
<LangVersion>preview</LangVersion>
<PackageId>ResultBoxes</PackageId>
<Version>0.3.18</Version>
<Version>0.3.19</Version>
<Authors>J-Tech Group</Authors>
<Company>J-Tech-Japan</Company>
<PackageDescription>ResultBoxes - C# Results Library that focus on Railway Programming.</PackageDescription>
<RepositoryUrl>https://github.com/J-Tech-Japan/ResultBoxes</RepositoryUrl>
<PackageVersion>0.3.18</PackageVersion>
<PackageVersion>0.3.19</PackageVersion>
<Description>Conveyer, Verify can take no param. Verify can take Task and Result</Description>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<PackageReadmeFile>README.md</PackageReadmeFile>
Expand Down

0 comments on commit 55ac88c

Please sign in to comment.