public List <T> RemoveFilteredUsers <T>(List <T> userList) where T : IUserBase { for (var i = 0; i < userList.Count; i++) { if (!_filterManager.CheckIfUserFiltered(userList[i])) { continue; } userList.RemoveAll(x => x.UserId == userList[i].UserId); i--; } return(userList); }