AKlaus / DomainResult

Tiny package for decoupling domain operation results from IActionResult and IResult types of ASP.NET Web API
Apache License 2.0
53 stars 3 forks source link

Add support for `ValueTask<IDomainResult>` returned type #42

Open AKlaus opened 2 years ago

AKlaus commented 2 years ago

Starting from C#7, asynchronous methods may return ValueTask<TResult> in addition to Task<Result> (see the difference between the two).

Hence, IDomainResults static extensions need to support not only Task<IDomainResult> returned type but also ValueTask<IDomainResult>.

At this stage, it seems that support for ValueTask<IActionResult>is not required as it hasn't been widely adopted (is it even supported by Kestrel?)