SignalR Hub Overloads

I tried to create a basic hub with two reception methods, one accepts a string and the other an int. This causes an error indicating that the method cannot be resolved. Commenting out one of the methods eliminates the error, and everything works.

Is it possible to have method overloads in my hub? Could there be something like overloads?

+5
source share
1 answer

SignalR supports overloading of server hub methods, but overloads should have different significance, i.e. take different arguments.

If overloads are of equal importance, SignalR will not be able to decide which overload is called, even if the overloaded Hub methods accept different types.

+10
source

All Articles