Beispiel #1
0
 public SingleContentEndpoint(IRepository<Content> repository, SiteSettings settings, ServerVariables vars, IUrlRegistry reg)
 {
     _repository = repository;
     _settings = settings;
     _vars = vars;
     _reg = reg;
 }
Beispiel #2
0
 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()))
                      };
 }
Beispiel #3
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);
        }
Beispiel #4
0
 public AttachmentConverter(SiteSettings siteSettings)
 {
     _siteSettings = siteSettings;
 }