CSharpFunctionalExtensions icon indicating copy to clipboard operation
CSharpFunctionalExtensions copied to clipboard

NoContent or Void function return but with typed Error

Open xavierjohn opened this issue 4 years ago • 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();

xavierjohn avatar Mar 27 '21 01:03 xavierjohn

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: https://github.com/vkhorikov/CSharpFunctionalExtensions/issues/200

vkhorikov avatar Mar 30 '21 21:03 vkhorikov