Skip to content

Instantly share code, notes, and snippets.

@biac
Created Dec 6, 2011
Embed
What would you like to do?
FeedReader: 最初の実装
public async Task<FeedData> ReadAsync(string feedUrlString)
{
Uri feedUri = new Uri(feedUrlString);
return await ReadAsync(feedUri);
}
private async Task<FeedData> ReadAsync(Uri feedUri)
{
SyndicationClient client = new SyndicationClient() { BypassCacheOnRetrieve = true };
SyndicationFeed feed = await client.RetrieveFeedAsync(feedUri); //
return feed.ToFeedData(); // ← return 文では FeedData 型を返しているつもり。
// async キーワードで勝手に Task<T> にラップしてくれる。
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment