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; }
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; }
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; }
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; }
public PostViewModel(IFrontMatter entity, IMarkupProcessorFactory markupProcessorFactory) : base(entity, markupProcessorFactory) { }
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; }