Update hubcontext.md (#9547)
parent
0d1834264f
commit
7e53e1a380
|
@ -38,7 +38,7 @@ Now, with access to an instance of `IHubContext`, you can call hub methods as if
|
|||
Access the `IHubContext` within the middleware pipeline like so:
|
||||
|
||||
```csharp
|
||||
app.Use(next => async (context) =>
|
||||
app.Use(async (context, next) =>
|
||||
{
|
||||
var hubContext = context.RequestServices
|
||||
.GetRequiredService<IHubContext<MyHub>>();
|
||||
|
|
Loading…
Reference in New Issue