Beispiel #1
0
        public async void LlamarApi()
        {
            ApiResponse response = await ApiCaller.GetCharacter();

            if (response.Successful)
            {
                try
                {
                    string strjson = "{\"Lista\":" + response.Response + "}";
                    var    lst     = JsonConvert.DeserializeObject <CharacterRoot>(strjson);
                    //lst.Lista.ForEach(x => Characters.Add(x));
                    Characters = new ObservableCollection <Character>(lst.Lista);
                }
                catch (Exception ex)
                {
                }
            }
        }