-
Notifications
You must be signed in to change notification settings - Fork 9
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
Pilfer TypedEventHandlerExtensions
from WCT
#404
base: main
Are you sure you want to change the base?
Conversation
(cherry picked from commit 7c58225)
namespace Microsoft.CmdPal.UI.Deferred; | ||
|
||
/// <summary> | ||
/// Extensions to <see cref="TypedEventHandler{TSender, TResult}"/> for Deferred Events. |
Check failure
Code scanning / check-spelling
Unrecognized Spelling
namespace Microsoft.CmdPal.UI.Deferred; | ||
|
||
/// <summary> | ||
/// Extensions to <see cref="TypedEventHandler{TSender, TResult}"/> for Deferred Events. |
Check failure
Code scanning / check-spelling
Unrecognized Spelling
public static class TypedEventHandlerExtensions | ||
{ | ||
/// <summary> | ||
/// Use to invoke an async <see cref="TypedEventHandler{TSender, TResult}"/> using <see cref="DeferredEventArgs"/>. |
Check failure
Code scanning / check-spelling
Unrecognized Spelling
public static class TypedEventHandlerExtensions | ||
{ | ||
/// <summary> | ||
/// Use to invoke an async <see cref="TypedEventHandler{TSender, TResult}"/> using <see cref="DeferredEventArgs"/>. |
Check failure
Code scanning / check-spelling
Unrecognized Spelling
/// </summary> | ||
/// <typeparam name="S">Type of sender.</typeparam> | ||
/// <typeparam name="R"><see cref="EventArgs"/> type.</typeparam> | ||
/// <param name="eventHandler"><see cref="TypedEventHandler{TSender, TResult}"/> to be invoked.</param> |
Check failure
Code scanning / check-spelling
Unrecognized Spelling
/// </summary> | ||
/// <typeparam name="S">Type of sender.</typeparam> | ||
/// <typeparam name="R"><see cref="EventArgs"/> type.</typeparam> | ||
/// <param name="eventHandler"><see cref="TypedEventHandler{TSender, TResult}"/> to be invoked.</param> |
Check failure
Code scanning / check-spelling
Unrecognized Spelling
where R : DeferredEventArgs => InvokeAsync(eventHandler, sender, eventArgs, CancellationToken.None); | ||
|
||
/// <summary> | ||
/// Use to invoke an async <see cref="TypedEventHandler{TSender, TResult}"/> using <see cref="DeferredEventArgs"/> with a <see cref="CancellationToken"/>. |
Check failure
Code scanning / check-spelling
Unrecognized Spelling
where R : DeferredEventArgs => InvokeAsync(eventHandler, sender, eventArgs, CancellationToken.None); | ||
|
||
/// <summary> | ||
/// Use to invoke an async <see cref="TypedEventHandler{TSender, TResult}"/> using <see cref="DeferredEventArgs"/> with a <see cref="CancellationToken"/>. |
Check failure
Code scanning / check-spelling
Unrecognized Spelling
/// </summary> | ||
/// <typeparam name="S">Type of sender.</typeparam> | ||
/// <typeparam name="R"><see cref="EventArgs"/> type.</typeparam> | ||
/// <param name="eventHandler"><see cref="TypedEventHandler{TSender, TResult}"/> to be invoked.</param> |
Check failure
Code scanning / check-spelling
Unrecognized Spelling
/// </summary> | ||
/// <typeparam name="S">Type of sender.</typeparam> | ||
/// <typeparam name="R"><see cref="EventArgs"/> type.</typeparam> | ||
/// <param name="eventHandler"><see cref="TypedEventHandler{TSender, TResult}"/> to be invoked.</param> |
Check failure
Code scanning / check-spelling
Unrecognized Spelling
@SeraphimaZykova fyi |
I think this pilfers the
InvokeAsync
as mentioned in #333WE can't use the actual version for the same reason we can't use that one TryEnqueue extension - the WCT MD Text block we're on uses a different version of the WCT than the latest version, so the two get confused.
We can remove this pilfered copy after either #245 or #219
Closes #333