Ejemplo n.º 1
0
        //+
        //- $GetDataSource -//
        private List <BlogEntry> GetDataSource()
        {
            String blogGuid = Themelia.Web.HttpData.GetScopedItem <String>(Info.Scope, Info.BlogGuid);

            if (String.IsNullOrEmpty(blogGuid))
            {
                throw new ArgumentNullException("BlogGuid is required.");
            }
            //+
            List <BlogEntry> blogEntryList = new List <BlogEntry>();

            if (this.AccessType != AccessType.Index)
            {
                blogEntryList = BlogAgent.GetNetBlogEntryList(blogGuid, this.Label, this.Archive, this.Link, BlogSection.GetConfigSection().EntriesToShow, false);
                //+
                if (this.AccessType == AccessType.Link)
                {
                    if (blogEntryList != null)
                    {
                        HttpData.SetScopedItem <String>(Info.Scope, "BlogEntryTitle", blogEntryList[0].Title);
                        //+
                        this.BlogEntryGuid = blogEntryList[0].Guid;
                    }
                }
            }
            //+
            return(blogEntryList);
        }