Public Sub Connect(userName As String) Dim id = Context.ConnectionId If ConnectedUsers.Count(Function(x) x.ConnectionId = id) = 0 Then ConnectedUsers.Add(New UserDetail() With { _ .ConnectionId = id, _ .UserName = userName _ }) ' send to caller Clients.Caller.onConnected(id, userName, ConnectedUsers, CurrentMessage) ' send to all except caller client Clients.AllExcept(id).onNewUserConnected(id, userName) End If End Sub
If ConnectedUsers.Where(Function(x) x.ConnectionId = id).Count = 0 Then
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)