コード例 #1
0
        public HomeController(IConfigurationManager configurationManager,
                              IConfigurationRepository configRepository,
                              IFrontMatterRepository frontMatterRepository,
                              IMarkupProcessorFactory markupProcessorFactory)
            : base(configurationManager)
        {
            if (configRepository == null)
            {
                throw new ArgumentNullException("configRepository");
            }

            if (frontMatterRepository == null)
            {
                throw new ArgumentNullException("frontMatterRepository");
            }

            if (markupProcessorFactory == null)
            {
                throw new ArgumentNullException("markupProcessorFactory");
            }

            ConfigRepository       = configRepository;
            FrontMatterRepository  = frontMatterRepository;
            MarkupProcessorFactory = markupProcessorFactory;
        }
コード例 #2
0
 public PageOfPostsViewModel(PageOf<IFrontMatter, FrontMatterSearchCriteria> entity, IMarkupProcessorFactory markupProcessorFactory)
 {
     Count = entity.Count;
     Entities = entity.Entities.Select(e => new PostViewModel(e, markupProcessorFactory)).ToList();
     SearchCriteria = new PostSearchCriteriaViewModel(entity.SearchCriteria);
     TotalCount = entity.TotalCount;
 }
コード例 #3
0
ファイル: UrlController.cs プロジェクト: typeset/typeset
        public UrlController(IConfigurationManager configurationManager,
            IConfigurationRepository configRepository, 
            IFrontMatterRepository frontMatterRepository,
            IMarkupProcessorFactory markupProcessorFactory)
            : base(configurationManager)
        {
            if (configRepository == null)
            {
                throw new ArgumentNullException("configRepository");
            }

            if (frontMatterRepository == null)
            {
                throw new ArgumentNullException("frontMatterRepository");
            }

            if (markupProcessorFactory == null)
            {
                throw new ArgumentNullException("markupProcessorFactory");
            }

            ConfigRepository = configRepository;
            FrontMatterRepository = frontMatterRepository;
            MarkupProcessorFactory = markupProcessorFactory;
        }
コード例 #4
0
ファイル: ContentViewModel.cs プロジェクト: typeset/typeset
 public ContentViewModel(IFrontMatter entity, IMarkupProcessorFactory markupProcessorFactory)
 {
     Date = entity.DateTime.HasValue ? entity.DateTime.Value : DateTimeOffset.MinValue;
     Title = entity.Title;
     Content = entity.Content;
     ContentType = entity.ContentType.ToString();
     HtmlContent = markupProcessorFactory.CreateInstance(entity.ContentType).Process(Content);
     Permalinks = entity.Permalinks;
     Tags = entity.Tags;
 }
コード例 #5
0
ファイル: ContentViewModel.cs プロジェクト: typeset/typeset
 public ContentViewModel(IFrontMatter entity, IMarkupProcessorFactory markupProcessorFactory)
 {
     Date        = entity.DateTime.HasValue ? entity.DateTime.Value : DateTimeOffset.MinValue;
     Title       = entity.Title;
     Content     = entity.Content;
     ContentType = entity.ContentType.ToString();
     HtmlContent = markupProcessorFactory.CreateInstance(entity.ContentType).Process(Content);
     Permalinks  = entity.Permalinks;
     Tags        = entity.Tags;
 }
コード例 #6
0
ファイル: PostViewModel.cs プロジェクト: typeset/typeset
 public PostViewModel(IFrontMatter entity, IMarkupProcessorFactory markupProcessorFactory)
     : base(entity, markupProcessorFactory)
 {
 }
コード例 #7
0
 public PageOfPostsViewModel(PageOf <IFrontMatter, FrontMatterSearchCriteria> entity, IMarkupProcessorFactory markupProcessorFactory)
 {
     Count          = entity.Count;
     Entities       = entity.Entities.Select(e => new PostViewModel(e, markupProcessorFactory)).ToList();
     SearchCriteria = new PostSearchCriteriaViewModel(entity.SearchCriteria);
     TotalCount     = entity.TotalCount;
 }
コード例 #8
0
 public PostViewModel(IFrontMatter entity, IMarkupProcessorFactory markupProcessorFactory)
     : base(entity, markupProcessorFactory)
 {
 }