I have a strongly typed Hub on the server:
public Foo : Hub<Bar> {}
Bar
is supposed to be an interface including methods available on the client side. But that solves only half of the problem (the server half). On the client side, I still have to use magic strings to define handlers for calls to the methods of Bar
:
hubConnection.On<int>("MethodInsideBar", param => DoSomething(param));
Is there a way to avoid doing this ? Shouldn't there be a way to implement Bar
client side and link the calls from the server to that implementation ?