public ChatHub(ILogger <ChatHub> logger, UserManager <IdentityUser> userManager, ChatMessagesService chatMessagesService) { _logger = logger; _userManager = userManager; _chatMessagesService = chatMessagesService; }
public void ProcessRequest(HttpContext context) { if (context.IsWebSocketRequest) { IChatMessageService chatMessageService = new ChatMessagesService(); context.AcceptWebSocketRequest(chatMessageService.WebSocketRequest); } }