-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Provide default implementation for IHubFilter.InvokeMethodAsync #23968
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -19,7 +19,7 @@ public interface IHubFilter | |
| /// <param name="invocationContext">The context for the method invocation that holds all the important information about the invoke.</param> | ||
| /// <param name="next">The next filter to run, and for the final one, the Hub invocation.</param> | ||
| /// <returns>Returns the result of the Hub method invoke.</returns> | ||
| ValueTask<object> InvokeMethodAsync(HubInvocationContext invocationContext, Func<HubInvocationContext, ValueTask<object>> next); | ||
| ValueTask<object> InvokeMethodAsync(HubInvocationContext invocationContext, Func<HubInvocationContext, ValueTask<object>> next) => next(invocationContext); | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why are hub filters an interface with a default implementation rather than an abstract base class?
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We're rebels. I actually think it's a good experiment to try this on
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not a fan of how people generally call |
||
|
|
||
| /// <summary> | ||
| /// Allows handling of the <see cref="Hub.OnConnectedAsync"/> method. | ||
|
|
||
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.
It might be worth adding a simple test that verifies you don't have to implement InvokeMethodAsync.