Esempio n. 1
0
 private void Follow(HttpRequestPost post, string cryptographic, HttpRequestGet get)
 {
     var resPost = post.Follow(cryptographic, TheArtiste.id.ToString(),
         Singleton.Singleton.Instance().CurrentUser.id.ToString());
     resPost.ContinueWith(delegate(Task<string> tmp)
     {
         var test = tmp.Result;
         if (test != null)
         {
             CoreApplication.MainView.CoreWindow.Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () =>
             {
                 var followers = get.GetFollows(new List<User>(), "users",
                     Singleton.Singleton.Instance().CurrentUser.id.ToString());
                 followers.ContinueWith(delegate(Task<object> task1)
                 {
                     var res = task1.Result as List<User>;
                     if (res != null)
                     {
                         CoreApplication.MainView.CoreWindow.Dispatcher.RunAsync(CoreDispatcherPriority.Normal,
                             () =>
                             {
                                 Singleton.Singleton.Instance().CurrentUser.follows = res;
                                 var a = TheArtiste;
                                 SetFollowText();
                             });
                     }
                 });
             });
         }
     });
 }