public TwitterTimeLineTest() { Target = new TwitterTimeLine(); }
static string CreateTitle(TwitterAccount account, TwitterTimeLine timeline) { return account.ScreenName + "'s " + (timeline == account.HomeTimeline ? "home" : (timeline == account.Mentions ? "mentions" : "dm")); }
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 (); }
TimelineInfo(TwitterAccountManager mgr, TimelineBase owner, TwitterTimeLine timeline, string title) : base(owner, title) { _mgr = mgr; Statuses = timeline; timeline.CollectionChanged += new NotifyCollectionChangedEventHandler (Timeline_CollectionChanged); }
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)); }
bool UseTimeline(TwitterTimeLine tl, List<TimelineInfo> list) { foreach (TimelineInfo info in list) { if (info != null) { if (info.Statuses == tl) return true; } } return false; }
bool UseTimeline(TwitterTimeLine tl) { return UseTimeline (tl, GetAllTimeLineInfo ()); }
public RestUsage() { TimeLine = new TwitterTimeLine (); }