Fix sample snippet by adding async (#8480)

Noticed that this sample snippet doesn't have the `async` keyword or return a task in the middleware func, so it won't compile as-is. Added `async` since it's the easiest way to do this.
pull/8485/head
Andrew Stanton-Nurse 2018-09-10 10:22:25 -07:00 committed by Scott Addie
parent dd507467f9
commit 10f4d96f93
1 changed files with 1 additions and 1 deletions

View File

@ -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: Access the `IHubContext` within the middleware pipeline like so:
```csharp ```csharp
app.Use(next => (context) => app.Use(next => async (context) =>
{ {
var hubContext = context.RequestServices var hubContext = context.RequestServices
.GetRequiredService<IHubContext<MyHub>>(); .GetRequiredService<IHubContext<MyHub>>();