private static List <User> PrepareUsersToChangePassword(UserRepository repo) { repo.FailDeliveredList = repo.FailDeliveredList != null ? repo.FailDeliveredList : new List <User>(); foreach (var user in repo.IncomeUserList) { PassAppResourcesConverter converter = new PassAppResourcesConverter(); user.Password = PasswordGenerator.Generate(converter.ResorcesStringToInt32Convert(Properties.Resources.MinPasswordLength), converter.ResorcesStringToInt32Convert(Properties.Resources.MaxPasswordLength)); repo.UsersToSendlist.Add(user); } return(repo.UsersToSendlist); }
private static List <User> PrepareNewUsersToSend(UserRepository repo) { foreach (var user in repo.IncomeUserList) { PassAppResourcesConverter converter = new PassAppResourcesConverter(); user.Password = PasswordGenerator.Generate(converter.ResorcesStringToInt32Convert(Properties.Resources.MinPasswordLength), converter.ResorcesStringToInt32Convert(Properties.Resources.MaxPasswordLength)); user.Login = new LoginGenerator().LoginListGeneration(user); repo.UsersToSendlist.Add(user); } return(repo.UsersToSendlist); }