28 lines
1.1 KiB
C#
28 lines
1.1 KiB
C#
using AyCode.Core.Loggers;
|
|
using AyCode.Services.Server.SignalRs;
|
|
using AyCode.Services.SignalRs;
|
|
using Microsoft.Extensions.Configuration;
|
|
|
|
namespace FruitBank.Common.Server.Services.SignalRs;
|
|
|
|
public class AcWebSignalRHubWithSessionBase<TSignalRTags, TLogger>(IConfiguration configuration, TLogger logger)
|
|
: AcWebSignalRHubBase<TSignalRTags, TLogger>(configuration, logger) where TSignalRTags : AcSignalRTags where TLogger : AcLoggerBase//Hub<ISignalRHubItemServer>, IAcSignalRHubServer
|
|
{
|
|
public override async Task OnConnectedAsync()
|
|
{
|
|
await base.OnConnectedAsync();
|
|
|
|
////insert or update them into database.
|
|
//var CId = _context.UserIdToCId.Find(userId);
|
|
//CId.ConnectionId = connectionid;
|
|
//_context.Update(CId);
|
|
//await _context.SaveChangesAsync();
|
|
//await base.OnConnectedAsync();
|
|
////await Groups.AddToGroupAsync(Context.ConnectionId, "SignalR Users");
|
|
}
|
|
|
|
public override async Task OnDisconnectedAsync(Exception? exception)
|
|
{
|
|
await base.OnDisconnectedAsync(exception);
|
|
}
|
|
} |