public OutputViewModel PreparePageTypeModel(PageTypeEnum pageType, string priority, string description, List <PageLinkModel> links, string title) { if (priority == null) { throw new ArgumentNullException("priority"); } if (description == null) { throw new ArgumentNullException("description"); } if (links == null) { throw new ArgumentNullException("links"); } if (title == null) { title = pageType.ToString().CamelCaseToWords(); } var model = OutputViewModel.CreatePageTypeOutputViewModel(pageType, priority, description, links, title); return(model); }
public static OutputViewModel CreatePageTypeOutputViewModel(PageTypeEnum pageType, string priority, string description, List <PageLinkModel> links, string title) { if (priority == null) { throw new ArgumentNullException("priority"); } if (description == null) { throw new ArgumentNullException("description"); } if (title == null) { throw new ArgumentNullException("title"); } var model = new OutputViewModel(true) { JumboTitle = title, PageTitle = title, Action = pageType, MetaDescription = description.SeoMetaDescriptionTruncate(), ArticleDescription = description, Filename = pageType.ToString(), Priority = priority, PageLinks = links, Total = links != null?links.Count() : 0 }; return(model); }
public OutputViewModel PreparePageTypeModel(PageTypeEnum pageType, string priority, string description, List<PageLinkModel> links, string title) { if (priority == null) throw new ArgumentNullException("priority"); if (description == null) throw new ArgumentNullException("description"); if (links == null) throw new ArgumentNullException("links"); if (title == null) { title = pageType.ToString().CamelCaseToWords(); } var model = OutputViewModel.CreatePageTypeOutputViewModel(pageType, priority, description, links, title); return model; }
public static OutputViewModel CreatePageTypeOutputViewModel(PageTypeEnum pageType, string priority, string description, List<PageLinkModel> links, string title) { if (priority == null) throw new ArgumentNullException("priority"); if (description == null) throw new ArgumentNullException("description"); if (title == null) throw new ArgumentNullException("title"); var model = new OutputViewModel(true) { JumboTitle = title, PageTitle = title, Action = pageType, MetaDescription = description.SeoMetaDescriptionTruncate(), ArticleDescription = description, Filename = pageType.ToString(), Priority = priority, PageLinks = links, Total = links != null ? links.Count() : 0 }; return model; }