private static async Task<IEnumerable<RssItem>> LoadItemsAsync(Uri feedUri)
 {
     var client = new HigLabo.Net.Rss.RssClient();
     var tcs = new TaskCompletionSource<HigLabo.Net.Rss.RssFeed>();
     client.GetRssFeed(feedUri, tcs.SetResult);
     var feed = await tcs.Task;
     return feed.Items.Select(item => new RssItem()
         {
             Title = item.Title,
             Description = item.Description,
             Link = item.Link
         });
 }
Beispiel #2
0
        private async Task PopulateSampleData()
        {
            if (isLoaded) return;

            //http://higlabo.codeplex.com/documentation
            var cl = new HigLabo.Net.Rss.RssClient();
            var fd = await cl.GetRssFeedAsync(new Uri("https://channel9.msdn.com/Feeds/RSS"));

            lbCommon.ItemsSource = fd.Items;
            lbCommon.ItemTemplateToUse = 1;
 

        }
Beispiel #3
0
        private static async Task <IEnumerable <RssItem> > LoadItemsAsync(Uri feedUri)
        {
            var client = new HigLabo.Net.Rss.RssClient();
            var tcs    = new TaskCompletionSource <HigLabo.Net.Rss.RssFeed>();

            client.GetRssFeed(feedUri, tcs.SetResult);
            var feed = await tcs.Task;

            return(feed.Items.Select(item => new RssItem()
            {
                Title = item.Title,
                Description = item.Description,
                Link = item.Link
            }));
        }
Beispiel #4
0
        private async Task PopulateSampleData()
        {
            if (isLoaded)
            {
                return;
            }

            //http://higlabo.codeplex.com/documentation
            var cl = new HigLabo.Net.Rss.RssClient();
            var fd = await cl.GetRssFeedAsync(new Uri("https://channel9.msdn.com/Feeds/RSS"));

            lbCommon.ItemsSource       = fd.Items;
            lbCommon.ItemTemplateToUse = 1;

            rcb.Invalidate();

            isLoaded = true;
        }