public FeedProvisionEndpoint(IRepository<Content> contents, IUrlRegistry registry, ServerVariables vars, PaginationSettings pagination, SiteSettings site)
 {
     _contents = contents;
     _itemsToTake = pagination.ItemsPerFeed;
     _feedSetup = new FeedSetup
                      {
                          SiteMasterName = site.SiteAuthor,
                          Title = site.SiteTitle,
                          CopyrightNotice = site.SiteCopyright,
                          UrlTemplate = registry.BuildAbsoluteUrlTemplate(vars, r => r.TemplateFor(new ContentId()))
                      };
 }
Exemple #2
0
        public ContentVM(
          Content content,
          SiteSettings siteSettings, 
          ServerVariables vars,
          IUrlRegistry registry)
        {
            _siteSettings = siteSettings;

            if (content == null) return;

            var url = registry != null && vars != null ? registry.BuildAbsoluteUrlTemplate(vars, r => r.UrlFor(new ContentId(content.Id))) : null;
            CommentData = new CommentDataVM(
                content.Id, 
                url,
                _siteSettings.DisqusSiteIdentifier, 
                _siteSettings.DisqusDeveloperMode,
                HtmlTags.JsonUtil.ToJson(content.Title));
            MapData(content);
        }
Exemple #3
0
 public SiteMapEndpoint(IRepository<Content> contents, IUrlRegistry urlRegistry, ServerVariables vars)
 {
     _contents = contents;
     _urlTemplate = urlRegistry.BuildAbsoluteUrlTemplate(vars, r => r.TemplateFor(new ContentId()));
 }