ASP.NET Core RC2 SignalR Hub Context outside request thread
<p>I am currently trying out the <code>RC2</code> release of <code>ASP.NET Core</code> and I am running into an issue with <code>SignalR</code>. I need to be able to send messages to the client outside of the request thread.</p>

<p>Now in the full .NET framework you can do this like:</p>

<pre><code>var context = GlobalHost.ConnectionManager.GetHubContext&lt;MyHub&gt;();
context.Clients.&lt;SendMessage&gt;()
</code></pre>

<p>But in <code>ASP.NET</code> Core there is no <code>GlobalHost</code>. </p>

<p>I found a similar question:
<a href="https://stackoverflow.com/questions/27299289/how-to-get-signalr-hub-context-in-a-vnext-project">How to get SignalR Hub Context in a vNext Project?</a></p>

<p>Where the second answer provides a method to get the hubcontext outside the request thread, but this also does not work in <code>ASP.NET Core</code>.</p>

<p>So my question is: how can I get the hub context outside of the request scope in ASP.NET Core?</p>