Consider adding IAsyncDisposable support for Browser and Page
See original GitHub issueThanks for building and maintaining this library!
Today, Browser
and Page
have CloseAsync()
+ Dispose()
.
Now that we have IAsyncDisposable
and await using
syntax, it would be nice for these types to also implement that interface and expose a DisposeAsync()
method which just calls CloseAsync()
.
This could be done while still targeting netstandard2.0 using https://www.nuget.org/packages/Microsoft.Bcl.AsyncInterfaces/.
If there is interest in this feature, I’d be happy to contribute it (if that would be helpful).
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
Implement a DisposeAsync method
Implement both dispose and async dispose patterns ... You may need to implement both the IDisposable and IAsyncDisposable interfaces, especially ...
Read more >.NET Asynchronous Disposal – Tips for Implementing ...
This one is pretty simple; you should only add IAsyncDisposable to your class if you or a derived class may allocate resources that...
Read more >c# - IAsyncDisposable reference implementation error?
1 Answer 1 · 1. But IAsyncDisposable does not implement IDisposable , so this cast may fail (_asyncDisposableResource as IDisposable)?. · 1 ·...
Read more >How to work with IAsyncDisposable in .NET 6
This article discusses the IAsyncDisposable interface and how to work with it in C#. To work with the code examples provided in this...
Read more >Communicating between .NET and JavaScript in Blazor ...
Unfortunately, IAsyncDisposable is not supported in .NET 3.1 Blazor, but it will be in future versions. Live Sample: ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Great. I have some time set aside for this next week.
V2.0.3 shipped @madelson !