本文整理汇总了C#中OpenTween.TabClass.AddSubmit方法的典型用法代码示例。如果您正苦于以下问题:C# TabClass.AddSubmit方法的具体用法?C# TabClass.AddSubmit怎么用?C# TabClass.AddSubmit使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OpenTween.TabClass
的用法示例。
在下文中一共展示了TabClass.AddSubmit方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OldestUnreadId_Test
public void OldestUnreadId_Test()
{
var tab = new TabClass { TabType = MyCommon.TabUsageType.UserTimeline };
tab.UnreadManage = true;
// 未読なし
Assert.Equal(-1L, tab.OldestUnreadId);
tab.AddPostToInnerStorage(new PostClass
{
StatusId = 100L,
IsRead = false, // 未読
});
tab.AddSubmit();
Assert.Equal(100L, tab.OldestUnreadId);
tab.AddPostToInnerStorage(new PostClass
{
StatusId = 50L,
IsRead = true, // 既読
});
tab.AddSubmit();
Assert.Equal(100L, tab.OldestUnreadId);
}
示例2: NextUnreadId_DisabledTest
public void NextUnreadId_DisabledTest()
{
var tab = new TabClass { TabType = MyCommon.TabUsageType.UserTimeline };
// 未読表示無効
tab.UnreadManage = false;
tab.AddPostToInnerStorage(new PostClass
{
StatusId = 100L,
IsRead = false, // 未読
});
tab.AddSubmit();
Assert.Equal(-1L, tab.NextUnreadId);
}
示例3: SetReadState_MarkAsUnreadTest
public void SetReadState_MarkAsUnreadTest()
{
var tab = new TabClass { TabType = MyCommon.TabUsageType.UserTimeline };
tab.UnreadManage = true;
tab.AddPostToInnerStorage(new PostClass
{
StatusId = 100L,
IsRead = true, // 既読
});
tab.AddSubmit();
Assert.Equal(0, tab.UnreadCount);
tab.SetReadState(100L, false); // 未読にする
Assert.Equal(1, tab.UnreadCount);
}
示例4: OldestUnreadIndex_DisabledTest
public void OldestUnreadIndex_DisabledTest()
{
var tab = new TabClass { TabType = MyCommon.TabUsageType.UserTimeline };
// 未読表示無効
tab.UnreadManage = false;
tab.AddPostToInnerStorage(new PostClass
{
StatusId = 100L,
IsRead = false, // 未読
});
tab.AddSubmit();
tab.SortMode = ComparerMode.Id;
tab.SortOrder = SortOrder.Ascending;
tab.Sort();
Assert.Equal(-1, tab.OldestUnreadIndex);
}
示例5: NextUnreadId_SortByIdAscTest
public void NextUnreadId_SortByIdAscTest()
{
var tab = new TabClass { TabType = MyCommon.TabUsageType.UserTimeline };
tab.UnreadManage = true;
// ID の昇順でソート
tab.SetSortMode(ComparerMode.Id, SortOrder.Ascending);
// 画面には上から 100 → 200 → 300 の順に並ぶ
tab.AddPostToInnerStorage(new PostClass { StatusId = 100L, IsRead = false });
tab.AddPostToInnerStorage(new PostClass { StatusId = 200L, IsRead = false });
tab.AddPostToInnerStorage(new PostClass { StatusId = 300L, IsRead = false });
tab.AddSubmit();
// 昇順/降順に関わらず、ID の小さい順に未読の ID を返す
Assert.Equal(100L, tab.NextUnreadId);
}
示例6: GetUnreadIds_Test
public void GetUnreadIds_Test()
{
var tab = new TabClass { TabType = MyCommon.TabUsageType.UserTimeline };
tab.UnreadManage = true;
Assert.Empty(tab.GetUnreadIds());
tab.AddPostToInnerStorage(new PostClass { StatusId = 100L, IsRead = false });
tab.AddPostToInnerStorage(new PostClass { StatusId = 200L, IsRead = true });
tab.AddSubmit();
Assert.Equal(new[] { 100L }, tab.GetUnreadIds());
tab.SetReadState(100L, true); // 既読にする
Assert.Empty(tab.GetUnreadIds());
}
示例7: NextUnreadIndex_Test
public void NextUnreadIndex_Test()
{
var tab = new TabClass { TabType = MyCommon.TabUsageType.UserTimeline };
tab.SetSortMode(ComparerMode.Id, SortOrder.Ascending);
tab.UnreadManage = true;
// 未読なし
Assert.Equal(-1, tab.NextUnreadIndex);
tab.AddPostToInnerStorage(new PostClass
{
StatusId = 50L,
IsRead = true, // 既読
});
tab.AddPostToInnerStorage(new PostClass
{
StatusId = 100L,
IsRead = false, // 未読
});
tab.AddPostToInnerStorage(new PostClass
{
StatusId = 150L,
IsRead = false, // 未読
});
tab.AddSubmit();
Assert.Equal(1, tab.NextUnreadIndex);
}
示例8: NextUnreadId_SortByScreenNameDescTest
public void NextUnreadId_SortByScreenNameDescTest()
{
var tab = new TabClass { TabType = MyCommon.TabUsageType.UserTimeline };
tab.UnreadManage = true;
// ScreenName の降順でソート
tab.SetSortMode(ComparerMode.Name, SortOrder.Descending);
// 画面には上から 300 → 100 → 200 の順に並ぶ
tab.AddPostToInnerStorage(new PostClass { StatusId = 100L, ScreenName = "bbb", IsRead = false });
tab.AddPostToInnerStorage(new PostClass { StatusId = 200L, ScreenName = "aaa", IsRead = false });
tab.AddPostToInnerStorage(new PostClass { StatusId = 300L, ScreenName = "ccc", IsRead = false });
tab.AddSubmit();
// 昇順/降順に関わらず、ScreenName の辞書順で小さい順に未読の ID を返す
Assert.Equal(200L, tab.NextUnreadId);
}