AspNetCore.Docs.Samples/samples/WebKeyedService/Hubs/MyHub.cs

14 lines
257 B
C#
Raw Normal View History

2023-09-14 11:00:09 +08:00
using Microsoft.AspNetCore.SignalR;
namespace WebKeyedService.Hubs;
2023-09-14 11:00:09 +08:00
// <snippet_1>
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>