示例#1
0
        public static SueetieRssBlogChannel LoadChannel()
        {
            SueetieRssBlogChannel channel;

            channel = new SueetieRssBlogChannel();
            channel.LoadFromUrl(FeedUrl);
            return(channel);
        }
示例#2
0
        public static SueetieRssBlogChannel LoadChannel(string _url)
        {
            FeedUrl = _url;
            SueetieRssBlogChannel channel;

            channel = new SueetieRssBlogChannel();
            channel.LoadFromUrl(_url);
            return(channel);
        }
示例#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());
        }