public void AddContact(string name, string id, string connectionId) { lock (usersOnlineLock) { if (_updatingUsersOnlineList) { return; } _updatingUsersOnlineList = true; _usersOnline.AddOrUpdate(name, id, (key, value) => { value = id; return(value); }); _clients.AllExcept(connectionId).addContact(new { Id = id, Name = name }); _updatingUsersOnlineList = false; } }
public T AllExcept(params string[] excludeConnectionIds) { return(TypedClientBuilder <T> .Build(_dynamicContext.AllExcept(excludeConnectionIds))); }
public void NotifyAllExceptCallerOfNew(string connectionId, TEntity entity) { _clients.AllExcept(connectionId).entityAdded(entity); }