示例#1
0
 public TwitterTimeLineTest()
 {
     Target = new TwitterTimeLine();
 }
示例#2
0
 static string CreateTitle(TwitterAccount account, TwitterTimeLine timeline)
 {
     return account.ScreenName + "'s " +
         (timeline == account.HomeTimeline ? "home" :
         (timeline == account.Mentions ? "mentions" : "dm"));
 }
示例#3
0
        public void CloseTimeLine(TwitterTimeLine timeline)
        {
            IDisposable disposeObj = null;
            List<SearchStatuses> list = new List<SearchStatuses> (_searches);
            for (int i = 0; i < list.Count; i++)
                if (list[i].Statuses == timeline) {
                    disposeObj = list[i];
                    list.RemoveAt (i);
                    _searches = list.ToArray ();
                    break;
                }

            List<ListStatuses> list2 = new List<ListStatuses> (_lists);
            for (int i = 0; i < list2.Count; i++)
                if (list2[i].Statuses == timeline) {
                    disposeObj = list2[i];
                    list2.RemoveAt (i);
                    _lists = list2.ToArray ();
                    break;
                }

            if (disposeObj != null)
                disposeObj.Dispose ();
        }
示例#4
0
 TimelineInfo(TwitterAccountManager mgr, TimelineBase owner, TwitterTimeLine timeline, string title)
     : base(owner, title)
 {
     _mgr = mgr;
     Statuses = timeline;
     timeline.CollectionChanged += new NotifyCollectionChangedEventHandler (Timeline_CollectionChanged);
 }
示例#5
0
 public TimelineInfo(TwitterAccountManager mgr, TimelineBase owner, TwitterAccount account, TwitterTimeLine timeline)
     : this(mgr, owner, timeline, CreateTitle (account, timeline))
 {
     RestAccount = account;
     RestUsage = (timeline == account.HomeTimeline ? account.RestHome :
         (timeline == account.Mentions ? account.RestMentions : account.RestDirectMessages));
 }
示例#6
0
 bool UseTimeline(TwitterTimeLine tl, List<TimelineInfo> list)
 {
     foreach (TimelineInfo info in list) {
         if (info != null) {
             if (info.Statuses == tl)
                 return true;
         }
     }
     return false;
 }
示例#7
0
 bool UseTimeline(TwitterTimeLine tl)
 {
     return UseTimeline (tl, GetAllTimeLineInfo ());
 }
示例#8
0
 public RestUsage()
 {
     TimeLine = new TwitterTimeLine ();
 }