public void crossValidateUser(APIMService[] apims) { ApimsFound = 0; if (!IsValidated) { validateUser(); } int index = 0; foreach (var apim in apims) { bool found = false; foreach (UserNormalizationStatus userIter in UsersStatus) { if (apim.APIMServiceName.Equals(userIter.APIMName)) { found = true; ApimsFound = ApimsFound + 1; } } if (!found) { UserNormalizationStatus newUNS = new UserNormalizationStatus { APIMName = apim.APIMServiceName, ExistsInAPIM = false, HasADB2C = false, IsEmailFoundInADB2C = false, IsFoundInADB2C = false, ObjectId = null }; UsersStatus.Insert(index, newUNS); validateUser(); } index++; } IsCrossValidated = true; }
private void RefreshUsersStatus() { UsersStatus.Clear(); //fresh each time! var discCtx = new DiscCtx(Discussions.ConfigManager.ConnStr); foreach (var p in discCtx.Person) { UsersStatus.Insert(0, p); } Dispatcher.BeginInvoke(new Action(() => { ValidateButtons(SessionInfo.Get()); }), System.Windows.Threading.DispatcherPriority.Background, null); }