Skip to content
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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

zadjii-msft
Copy link
Owner

I think this pilfers the InvokeAsync as mentioned in #333

WE 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

namespace Microsoft.CmdPal.UI.Deferred;

/// <summary>
/// Extensions to <see cref="TypedEventHandler{TSender, TResult}"/> for Deferred Events.

Check failure

Code scanning / check-spelling

Unrecognized Spelling

[TSender](#security-tab) is not a recognized word. \(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

[TResult](#security-tab) is not a recognized word. \(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

[TSender](#security-tab) is not a recognized word. \(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

[TResult](#security-tab) is not a recognized word. \(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

[TSender](#security-tab) is not a recognized word. \(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

[TResult](#security-tab) is not a recognized word. \(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

[TSender](#security-tab) is not a recognized word. \(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

[TResult](#security-tab) is not a recognized word. \(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

[TSender](#security-tab) is not a recognized word. \(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

[TResult](#security-tab) is not a recognized word. \(unrecognized-spelling\)
@stefansjfw
Copy link
Collaborator

@SeraphimaZykova fyi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

RandomAccessStream icons don't work
2 participants