mirror of
https://github.com/ckaczor/HomeMonitor.git
synced 2026-02-16 10:58:32 -05:00
Update Hub to .NET 8 and all OpenTelemetry
This commit is contained in:
@@ -1,17 +1,17 @@
|
||||
using JetBrains.Annotations;
|
||||
using Microsoft.AspNetCore.SignalR;
|
||||
using System;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ChrisKaczor.HomeMonitor.Hub.Service.Hubs
|
||||
{
|
||||
[UsedImplicitly]
|
||||
public class WeatherHub : Microsoft.AspNetCore.SignalR.Hub
|
||||
public class WeatherHub(ILogger<WeatherHub> logger) : Microsoft.AspNetCore.SignalR.Hub
|
||||
{
|
||||
[UsedImplicitly]
|
||||
public async Task SendLatestReading(string message)
|
||||
{
|
||||
Console.WriteLine(message);
|
||||
logger.LogInformation(message);
|
||||
|
||||
await Clients.Others.SendAsync("LatestReading", message);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user