You seem to be on the right track.
This is a feature slated for release in SignalR 2.1. You can look at how it is implemented here: https://github.com/SignalR/SignalR/commit/3c4b8794b0f512daec677110a8e41ac717514584
While there is likely a way to do this with Castle DynamicProxy, it might be simpler to use ImpromptuInterface.
Every call made to TypedClientBuilder<T>.Build(_dynamicContext...)
could be replaced with Impromptu.ActLike<T>(_dynamicContext...)
. In your case, the call to Impromptu.ActLike
would replace proxyGen.CreateInterfaceProxyWithTarget
.
If you feel really adventurous, you can try out the SignalR nightlies from MyGet which already have the feature included.