vkhorikov/CSharpFunctionalExtensions

NoContent or Void function return but with typed Error

xavierjohn opened this issue · 1 comments

Today we have
Result.cs
ResultT.cs
ResultTE.cs

To write something like
ResultE.cs
does not make sense since it will confuse the compiler.

If there was an empty NoContent class, then we can bypass this issue for void functions that only wants to return a typed Error.
Example: Result<NoContent,Error> SaveToDatabase();

ResultE is going to be UnitResult.
NoContent (Unit) is a simple workaround for the time being, while UnitResult is in the works.
Check out this ticket: #200