Chessie icon indicating copy to clipboard operation
Chessie copied to clipboard

Added support for C# source inclusion

Open gsscoder opened this issue 10 years ago • 1 comments

Hi there, thanks for sharing this wonderful library. I've also appreciated C# extension methods, but I think (personal opinion) that some C# developer could prefer including Result<TSuccess,TMessage> directly at source level (without referencing an assembly).

For this reason I've ported your work to C# native implementation. I've skipped async part, since is mainly for computation expressions and in C# Task<Result<TSucc,TMsg>> will suffice.

This is the link to the project: https://github.com/gsscoder/railwaysharp. (I've also included test code from your project).

Feel free to do with it whatever you want...

Regards, Giacomo

gsscoder avatar Jul 17 '15 10:07 gsscoder

Work made to make it more C#-ish: https://github.com/gsscoder/railwaysharp/blob/master/src/RailwaySharp/ErrorHandling.cs:

  • removed "custom" Fold func using Linq Aggregate
  • removed custom pair OkPair in Ok case

Next step:

  • remove some Trial functions
  • put some Trial funcs directly as ext. m.

R. Giacomo

gsscoder avatar Sep 03 '15 13:09 gsscoder