birbmap/Birdmap.BLL/Services/CommunationServices/Hubs/ServicesHub.cs

32 lines
816 B
C#

using Microsoft.AspNetCore.SignalR;
using Microsoft.Extensions.Logging;
using System;
using System.Threading.Tasks;
namespace Birdmap.BLL.Services.CommunicationServices.Hubs
{
public class ServicesHub : Hub<IServicesHubClient>
{
private readonly ILogger<ServicesHub> _logger;
public ServicesHub(ILogger<ServicesHub> logger)
{
_logger = logger;
}
public override Task OnConnectedAsync()
{
_logger.LogInformation("Services Hub Client connected.");
return base.OnConnectedAsync();
}
public override Task OnDisconnectedAsync(Exception exception)
{
_logger.LogInformation("Services Hub Client disconnected.");
return base.OnDisconnectedAsync(exception);
}
}
}