2023-09-14 11:00:09 +08:00
|
|
|
using Microsoft.AspNetCore.SignalR;
|
2023-09-14 09:57:36 +08:00
|
|
|
|
|
|
|
namespace WebKeyedService.Hubs;
|
|
|
|
|
2023-09-14 11:00:09 +08:00
|
|
|
// <snippet_1>
|
2023-09-14 09:57:36 +08:00
|
|
|
public class MyHub : Hub
|
|
|
|
{
|
|
|
|
public void Method([FromKeyedServices("small")] ICache cache)
|
|
|
|
{
|
|
|
|
Console.WriteLine(cache.Get("signalr"));
|
|
|
|
}
|
2023-09-14 11:00:09 +08:00
|
|
|
}
|
|
|
|
// </snippet_1>
|