public ActionResult Index(string section, string type, string url) { if (string.IsNullOrEmpty(section)) { //Render all return(View("Toc", Documentation.GetAll())); } var docsSection = Documentation.GetDocs(section); if (docsSection == null) { return(View("SectionNotFound")); } _breadCrumbsBuilder.Add(docsSection); if (!string.IsNullOrEmpty(type) && !string.IsNullOrEmpty(url)) { //Lookup method var function = docsSection.Methods.Where(x => x.Path.Equals(url, StringComparison.OrdinalIgnoreCase) && x.HttpMethod.Equals(type, StringComparison.OrdinalIgnoreCase)).SingleOrDefault(); if (function != null) { _breadCrumbsBuilder.Add(docsSection, function); return(View("Function", new SectionMethodViewModel(docsSection, function))); } return(View("FunctionNotFound")); } return(View("Section", docsSection)); }
public ActionResult Toc(string type) { if (string.Equals("top", type)) { return(PartialView("TopTocControl", Documentation.GetAll())); } return(PartialView("TocContorl", Documentation.GetAll())); }
public ActionResult Navigation() { return(View(Documentation.GetAll())); }