question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Consider adding IAsyncDisposable support for Browser and Page

See original GitHub issue

Thanks 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:closed
  • Created 3 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
madelsoncommented, Apr 1, 2020

Great. I have some time set aside for this next week.

0reactions
kblokcommented, Apr 16, 2020

V2.0.3 shipped @madelson !

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found