Created
March 21, 2013 14:47
-
-
Save bitsprint/5213600 to your computer and use it in GitHub Desktop.
ApiControllerWithHub.csx
This file contains hidden or 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
| public abstract class ApiControllerWithHub<THub> : ApiController where THub : IHub | |
| { | |
| Lazy<IHubContext> hub = new Lazy<IHubContext>( | |
| () => GlobalHost.ConnectionManager.GetHubContext<THub>() | |
| ); | |
| protected IHubContext Hub | |
| { | |
| get { return hub.Value; } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment