pull/185/head
Rick Anderson 2023-09-13 17:00:09 -10:00 committed by GitHub
parent 4a6432f711
commit a69dea45e9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 5 deletions

View File

@ -1,6 +1,6 @@
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc;
namespace WebKeyedService;
namespace WebKeyedService.Controllers;
[ApiController]
[Route("/cache")]

View File

@ -1,12 +1,13 @@
using Microsoft.AspNetCore.SignalR;
using Microsoft.AspNetCore.SignalR;
namespace WebKeyedService.Hubs;
// <snippet_1>
public class MyHub : Hub
{
public void Method([FromKeyedServices("small")] ICache cache)
{
Console.WriteLine(cache.Get("signalr"));
}
}
}
// </snippet_1>