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