//restituisce gli utenti che hanno corrispondenza con il filtro (nome cognome contiene il filtro) async Task ExecuteLoadItemsCommandFiltered(string Filter) { if (IsBusy) { return; } IsBusy = true; if (IsLoading) { return; } IsLoading = true; try { Items.Clear(); AmiciClient amiciClient = new AmiciClient(await ApiHelper.GetApiClient()); ICollection <UserInfoDto> listaUsers; if (Filter != null && Filter.Length != 0) { listaUsers = await amiciClient.GetRicercaUtentiAsync(Filter); foreach (var user in listaUsers) { if (user.PhotoUrl != null) { using (var webClient = new WebClient()) { byte[] imageBytes = webClient.DownloadData(user.PhotoUrl); user.FotoProfilo = imageBytes; } } Items.Add(user); } } } catch (Exception ex) { Debug.WriteLine(ex); } finally { IsBusy = false; IsLoading = false; } }