Exemplo n.º 1
0
        public RssResponse(IEnumerable<BlogPost> model, Uri BlogUrl, BlogConfig blogConfig)
        {
            this.blogConfig = blogConfig;
            this.BlogUrl = BlogUrl;

            this.Contents = GetXmlContents(model);
            this.ContentType = "application/rss+xml";
            this.StatusCode = HttpStatusCode.OK;
        }
Exemplo n.º 2
0
 public AddCommentTask(IDocumentStore documentStore, BlogConfig config, string postId,
                       PostComments.CommentInput commentInput, RequestValues requestValues)
 {
     _config = config;
     this.commentInput = commentInput;
     this.requestValues = requestValues;
     this.postId = postId;
     this.RavenDocumentStore = documentStore;
 }
Exemplo n.º 3
0
        private void LoadWidgets(IDocumentSession session, BlogConfig blogConfig)
        {
            var widgets = new List<WidgetViewModel>();

            // TODO: Use AreaConfigs, Constants, admin create
            if (blogConfig != null && blogConfig.Widgets != null)
            {
                widgets.AddRange(blogConfig.Widgets.Select(widget => new WidgetViewModel(session, widget)));
            }

            Model.Widgets = widgets;
        }