-
-
Save riccardod/a88e1b87ea2bba7340f5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class SignalRStartup | |
{ | |
public void Configuration(IAppBuilder app) | |
{ | |
var kernel = AppBase.Container; | |
var resolver = new FunqDependencyResolver(kernel); | |
app.Map("/signalr", map => | |
{ | |
kernel.Register<IOffloadService>(x => new OffloadService()); | |
kernel.Register<IHubConnectionContext>(context => | |
resolver.Resolve<IConnectionManager>(). | |
GetHubContext<OffloadHub>().Clients | |
); | |
var hubConfiguration = new HubConfiguration | |
{ | |
Resolver = resolver, | |
EnableDetailedErrors = true, | |
}; | |
map.RunSignalR(hubConfiguration); | |
}); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment