Add first WinForms Async experimental APIs#11828
Conversation
|
|
||
| /// <summary> | ||
| /// Called by the NativeWindow callback, when an exception is caught. This will be rerouted to the | ||
| /// Application.ThreadException, but in certain Async scenarios it makes more sense, to be able to |
There was a problem hiding this comment.
Showing Forms, whose Exception handling was always handled unfortunate to begin with, maybe later also Popups for .NET 10.
Example: Throw an exception in Form.OnLoad and try to gracefully handle it, when you Show (not Dialog-show) the form from another form. It's a discoverability nightmare for so many folks. My aim is it to make it more intuitively. And retrofit at least analyzers for it later.
There was a problem hiding this comment.
The example needs added in remarks. Pull out everything but the summary into remarks.
| /// <param name="action">The synchronous action to execute.</param> | ||
| /// <param name="cancellationToken">The cancellation token.</param> | ||
| /// <returns>A task representing the operation and containing the function's result.</returns> | ||
| [Experimental(DiagnosticIDs.ExperimentalAsync, UrlFormat = "https://aka.ms/winforms-experimental/{0}")] |
There was a problem hiding this comment.
I thought the plan was for these ones (InvokeAsync) to not be experimental.
There was a problem hiding this comment.
I'll ask Immo.
I am with you, but then I would beg you to keep the option for me to REALLY test InvokeAsync additionally coming Saturday and Sunday and then, should I find something, do a follow-up PR before we snap on Sunday afternoon. Would you let me?
There was a problem hiding this comment.
Yes. Not experimental.
b1a2e58 to
8b55b0c
Compare
dd449fb to
7b3d202
Compare
7b3d202 to
214f8ee
Compare
51e9159 to
908f0bc
Compare
908f0bc to
6ab78b8
Compare
484eefb to
5870b4b
Compare
5870b4b to
71b6034
Compare
|
Closing this PR, as it needs to be cherry-picked into a new one based on main. |
|
Note that this is not dead, we're simply trying to detangle it from some other work to ensure it gets in for RC1 as an encapsulated change rather than dependent on other PRs in flight. |
Note: This PR is based on #10985.
That's why this PR has been based against feature/darkmode which holds the exact copy of the DarkMode feature.
Introduces new experimental APIs for .NET 9:
Control.InvokeAsync.TaskDialog.ShowDialogAsync.Form.ShowAsync.Form.ShowDialogAsyncFixes #10739.
Replaces #9827.