public async Task <List <Pattern> > GetPatterns() { try { string json = await _client.get_patterns(App.GetUser().login); return(JsonConvert.DeserializeObject <List <Pattern> >(json)); } catch (Exception ex) { await Application.Current.MainPage.DisplayAlert("Ошибка", "Нет связи с сервером", "Ок"); return(new List <Pattern>()); } }