public IAppTab CreateTab(IBrowserTabProxy aTabProxy, User aUser) { int id = iCounter++; var tab = new LoginAppTab(this, aTabProxy, id); lock (iLock) { iTabs.Add(tab); foreach (var user in iUsers.Values) { tab.NewMessage( new JsonObject { { "type", "user"}, { "userid", user.User.Id }, { "oldValue", JsonNull.Instance }, { "newValue", UserToJson(user.User) } }); } } return tab; }
internal void RemoveTab(LoginAppTab aTab) { lock (iLock) { iTabs.Remove(aTab); } }