Ejemplo n.º 1
0
        public static SueetieRssBlogChannel LoadChannel()
        {
            SueetieRssBlogChannel channel;

            channel = new SueetieRssBlogChannel();
            channel.LoadFromUrl(FeedUrl);
            return(channel);
        }
Ejemplo n.º 2
0
        public static SueetieRssBlogChannel LoadChannel(string _url)
        {
            FeedUrl = _url;
            SueetieRssBlogChannel channel;

            channel = new SueetieRssBlogChannel();
            channel.LoadFromUrl(_url);
            return(channel);
        }
Ejemplo n.º 3
0
        public static List <SueetieRssBlogPost> GetSueetieRssBlogPostList(ContentQuery contentQuery)
        {
            var key = SueetieRssBlogPostListCacheKey(contentQuery.FeedUrl);

            var sueetieRssBlogPosts = SueetieCache.Current[key] as List <SueetieRssBlogPost>;

            if (sueetieRssBlogPosts == null)
            {
                var sueetieRssBlogChannel           = SueetieRssBlogChannel.LoadChannel(contentQuery.FeedUrl);
                List <SueetieRssBlogItem> _rssItems = sueetieRssBlogChannel.Items;
                sueetieRssBlogPosts = ConvertBlogPosts(_rssItems);
                SueetieCache.Current.InsertMinutes(key, sueetieRssBlogPosts, contentQuery.CacheMinutes);
            }
            return(sueetieRssBlogPosts.Take(contentQuery.NumRecords).ToList());
        }