Add IAsyncDispose support
Although #49 was closed on the grounds that SpecFlow "won't probably use it for a long time", @SabotageAndi did say:
But that doesn't mean, that we would not accept a PR for it
So here's a PR for it.
This necessarily expands the set of target frameworks. Previously, the target frameworks were net45 and netcoreapp2.0, we need to add netcoreapp3.1 because each of these has a different relationship with IAsyncDisposable
net45: no support availablenetstandard2.0: implemented viaMicrosoft.Bcl.AsyncInterfacesNuGet packagenetcoreapp3.1: built into .NET runtime class libraries
If we continued to target only netstandard2.0, we'd be introducing an unnecessary dependency on Microsoft.Bcl.AsyncInterfaces for any apps using .NET Core 3.1 or later. so although .NET Core 3.1 does of course support netstandard2.0, it's better to provide a .NET Core 3.1 target that doesn't need the extra reference to get IAsyncDisposable.
I've opened this in draft mode because I don't yet know whether you would like https://github.com/SpecFlowOSS/SpecFlow/issues/2575 to be implemented. That's the only reason I'm looking to add this.
If you do want that, I want to prototype the SpecFlow side of the implementation to the point that it can validate that the BoDi changes in this PR are sufficient. I was aiming to set this to "ready for review" once I've done that validation.
The comment was from a time when https://github.com/SpecFlowOSS/SpecFlow/pull/1614 was way in the future. As I commented today there, with the retirement of the SpecFlow+ Runner, the biggest blocker for it is gone.
So I think, when async/await is fixed in SpecFlow, this PR is useful. I don't know if it is already making sense to bring this to SpecFlow, as for me the async/await support in SpecFlow is simply not finished.