-
-
Notifications
You must be signed in to change notification settings - Fork 88
Added CancellationTokenSource to ProgressDialog #54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR 👍. Added some comments
LMK when it's ready for review again |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good and almost there. Added a couple comments
I've considered adding the cancellationToken to the Show / ShowDialog but there's quite a lot of methods like these, are you sure you want to add the CancellationToken to every one of these methods? |
Yes... Because calling My initial thinking was to add new overloads (rather than include the So either: Ookii.Dialogs.Wpf v3.2.0Show()
+Show(CancellationToken cancellationToken)
Show(object argument)
+Show(object argument, CancellationToken cancellationToken)
ShowDialog()
+ShowDialog(CancellationToken cancellationToken)
ShowDialog(Window owner)
+ShowDialog(Window owner, CancellationToken cancellationToken)
ShowDialog(IntPtr owner)
+ShowDialog(IntPtr owner, CancellationToken cancellationToken)
ShowDialog(Window owner, object argument)
+ShowDialog(Window owner, object argument, CancellationToken cancellationToken)
ShowDialog(IntPtr owner, object argument)
+ShowDialog(IntPtr owner, object argument, CancellationToken cancellationToken) or Ookii.Dialogs.Wpf v4.0.0-Show()
+Show(CancellationToken cancellationToken = default)
-Show(object argument)
+Show(object argument, CancellationToken cancellationToken = default)
-ShowDialog()
+ShowDialog(CancellationToken cancellationToken = default)
-ShowDialog(Window owner)
+ShowDialog(Window owner, CancellationToken cancellationToken = default)
-ShowDialog(IntPtr owner)
+ShowDialog(IntPtr owner, CancellationToken cancellationToken = default)
-ShowDialog(Window owner, object argument)
+ShowDialog(Window owner, object argument, CancellationToken cancellationToken = default)
-ShowDialog(IntPtr owner, object argument)
+ShowDialog(IntPtr owner, object argument, CancellationToken cancellationToken = default) |
Co-authored-by: "C. Augusto Proiete" <augusto@proiete.com>
@vpenades your changes have been merged, thanks for your contribution 👍 |
Also Added IServiceProvider to ProgressDialog, so we can retrieve CancellationTokenSource from 'Sender' event argument.