namespace MinicsConsole.Hubs;

public class LogHub(LogSender logConnector) : Hub
{
    public override Task OnConnectedAsync()
    {
        logConnector.Clients = this.Clients;
        return base.OnConnectedAsync();
    }

    public override Task OnDisconnectedAsync(Exception? exception)
    {
        logConnector.Clients = null;
        return base.OnDisconnectedAsync(exception);
    }
}