本文整理汇总了C#中Folder.GetBookmarks方法的典型用法代码示例。如果您正苦于以下问题:C# Folder.GetBookmarks方法的具体用法?C# Folder.GetBookmarks怎么用?C# Folder.GetBookmarks使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Folder
的用法示例。
在下文中一共展示了Folder.GetBookmarks方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetBookmarksTest
public void GetBookmarksTest()
{
Login l = new Login();
WebBrowser wb = l.GetBrowserElement();
wb.DocumentCompleted += delegate(Object sender, WebBrowserDocumentCompletedEventArgs args)
{
OAuthHelper h = new OAuthHelper(wb); // TODO: Passenden Wert initialisieren
InstapaperConnector target = new InstapaperConnector(h); // TODO: Passenden Wert initialisieren
Folder folder = new Folder(target);
folder.Id = Folder.STARRED;
folder.GetBookmarks(delegate(IAsyncResult result)
{
// Should return an empty List in case of zero folders
if (folder.Bookmarks.Count > 0)
foreach (Bookmark b in folder.Bookmarks)
Assert.IsNotNull(b);
});
};
}
示例2: GetBookmarkText
public void GetBookmarkText()
{
Login l = new Login();
WebBrowser wb = l.GetBrowserElement();
wb.DocumentCompleted += delegate(Object sender, WebBrowserDocumentCompletedEventArgs args)
{
OAuthHelper h = new OAuthHelper(wb); // TODO: Passenden Wert initialisieren
InstapaperConnector target = new InstapaperConnector(h); // TODO: Passenden Wert initialisieren
Folder folder = new Folder(target);
folder.Id = Folder.STARRED;
folder.GetBookmarks(delegate(IAsyncResult result)
{
folder.Bookmarks[0].GetText(delegate(IAsyncResult res)
{
Assert.IsTrue(folder.Bookmarks[0].HtmlText.Length > 0);
});
});
};
}
示例3: loadFolder
private void loadFolder(String folder_id)
{
Folder f = new Folder(getConnector());
f.Id = folder_id;
f.GetBookmarks(delegate(IAsyncResult res) {
BookmarkList.Clear();
for (int i = 0; i < f.Bookmarks.Count; i++)
{
Bookmark bookmark = f.Bookmarks[i];
BookmarkList.Items.Add(bookmark.Title);
Console.WriteLine("Adding Bookmark: " + bookmark.Title);
}
currentBookmarks = f.Bookmarks;
});
}