Пример #1
0
 static void FetchUserFromUrl(string url, Action <User> cback)
 {
     TwitterAccount.CurrentAccount.Download(url, res => {
         if (res == null)
         {
             cback(null);
             return;
         }
         User user;
         lock (Database.Main){
             user = User.UnlockedLoadUsers(res).FirstOrDefault();
         }
         cback(user);
     });
 }
Пример #2
0
        protected override void PopulateRootFrom(Stream result)
        {
            lock (Database.Main){
                Database.Main.Execute("BEGIN");
                var userStream = User.UnlockedLoadUsers(result);

                Root = new RootElement(StreamedTitle)
                {
                    new Section()
                    {
                        from user in userStream select(Element) new UserElement(user)
                    }
                };
                Database.Main.Execute("END");
            }
        }