paulegradie / Sailfish

Sailfish - a production friendly performance benchmark runner for .NET
https://paulgradie.com/Sailfish/
MIT License
11 stars 4 forks source link

Refactor method injections for clarity and correctness #141

Closed paulegradie closed 4 months ago

paulegradie commented 4 months ago

Description

The original impl of the invocation reflection concerned itself with the discrimination of different types of methods (async, sync, parameterized, non parameterized, etc). This led to poor experience when encountering exceptions or specific edge cases.

Fixes: https://github.com/paulegradie/Sailfish/issues/139

Results

This PR cleans up the exceptions, simplifies the invocation methods, and allows cancellation tokens to be injected in any method.