-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Fix client results with Hub<T> IHubContext #41763
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.
DIMs! It might not be worth it since we own the type, but given this has happened once, I wonder if we should have a reflection based test a little like CloneSslOptionsClonesAllProperties to make sure we've overridden all the DIMs. Nvm. I now realize it's just the one method.
|
Can you remind me why it would be a bad idea to update
to T Single(string connectionId) => Client(connectionId);Had we done that, we never experience this bug. |
|
The problem with that is that when we try to generate the underlying code to call |
But it still would have worked for non-returning methods, right? I figured we were already using Is there a reason for not returning a aspnetcore/src/SignalR/server/Core/src/Internal/TypedClientBuilder.cs Lines 172 to 179 in 8a4b4de
I understand the need for an additional property with a new type for the non- |
|
If we did that, we would have an inconsistent experience with strongly-typed vs. non-strongly-typed. Because non-strongly-typed's version of |
|
We should delete I see the inconsistent experience with strongly-typed vs. non-strongly-typed hubs as a complete non-issue. It's FAR better to be "inconsistent" here! We're already being inconsistent by returning the exact same type from both I understand that we can't change However, that doesn't mean we should nerf strongly-typed hubs! So what if they are more flexible with their |
|
I don't understand what you're trying to fix @halter73. |
David found this while writing an app.
IHubContext<Hub<T>, T>didn't haveSingle(string connectionId)implemented and fell back to the DIM which throwsNotImplementedException.