public static string DocUrl(this UrlHelper url, MsDocEntryPoint section, MsDocEntryPointMethod method, object controller) { var sectionName = section != null ? section.Name : null; return method == null ? url.DocUrl(sectionName, null, null, null, controller) : url.DocUrl(sectionName, method.Category, method.HttpMethod, method.Path, controller); }
public static object GetRouteValues(MsDocEntryPoint section, MsDocEntryPointMethod method, object controller) { var sectionName = section != null ? section.Name : null; return method == null ? GetRouteValues(sectionName, null, null, null, controller) : GetRouteValues(sectionName, method.Category, method.HttpMethod, method.Path, controller); }
public static object GetRouteValues(MsDocEntryPoint section, MsDocEntryPointMethod method, object controller) { var sectionName = section != null ? section.Name : null; return(method == null? GetRouteValues(sectionName, null, null, null, controller) : GetRouteValues(sectionName, method.Category, method.HttpMethod, method.Path, controller)); }
public static string DocUrl(this UrlHelper url, MsDocEntryPoint section, MsDocEntryPointMethod method, object controller) { var sectionName = section != null ? section.Name : null; return(method == null? url.DocUrl(sectionName, null, null, null, controller) : url.DocUrl(sectionName, method.Category, method.HttpMethod, method.Path, controller)); }
public static string GetDocUrl(MsDocEntryPoint section, MsDocEntryPointMethod method, object controller, RequestContext context) { var sectionName = section != null ? section.Name : null; return(method == null? GetDocUrl(sectionName, null, null, null, controller, context) : GetDocUrl(sectionName, method.Category, method.HttpMethod, method.Path, controller, context)); }
public static string GetActionName(MsDocEntryPoint section, MsDocEntryPointMethod method) { var sectionName = section != null ? section.Name : null; return(method == null? GetActionName(sectionName, null, null, null) : GetActionName(sectionName, method.Category, method.HttpMethod, method.Path)); }
public void Add(MsDocEntryPoint section, MsDocEntryPointMethod method) { if (section != null) { Add(section.Name, "Docs", "Index", "Documentation", Url.GetRouteValues(section.Name, null, null)); } if (method != null && section != null) { Add(string.IsNullOrEmpty(method.ShortName) ? (string.IsNullOrEmpty(method.Summary) ? method.FunctionName : method.Summary) : method.ShortName, "Docs", "Index", "Documentation", Url.GetRouteValues(section.Name, method.HttpMethod, method.Path)); } }
public void Add(MsDocEntryPoint section, MsDocEntryPointMethod method) { if (section != null) { Add(section.Name, "Docs", "Index", "Documentation", Url.GetRouteValues(section.Name, null, null)); } if (method != null && section!=null) { Add(string.IsNullOrEmpty(method.ShortName) ? (string.IsNullOrEmpty(method.Summary) ? method.FunctionName : method.Summary) : method.ShortName, "Docs", "Index", "Documentation", Url.GetRouteValues(section.Name, method.HttpMethod, method.Path)); } }
public static MvcHtmlString DocMethodLink(this HtmlHelper helper, MsDocEntryPoint section, MsDocEntryPointMethod method) { var type = method.HttpMethod; var path = method.Path; var controller = helper.ViewContext.RequestContext.RouteData.Values["controller"]; var context = helper.ViewContext.RequestContext; var spanMethod = new TagBuilder("span"); spanMethod.AddCssClass("http-" + type.ToLowerInvariant()); spanMethod.InnerHtml = HttpUtility.HtmlEncode(type); var tagBuilder = new TagBuilder("a") { InnerHtml = spanMethod.ToString(TagRenderMode.Normal) + " " + HttpUtility.HtmlEncode(path) }; tagBuilder.AddCssClass("underline"); tagBuilder.MergeAttribute("href", Url.GetDocUrl(section, method, controller, context)); return MvcHtmlString.Create(tagBuilder.ToString(TagRenderMode.Normal)); }
public static MvcHtmlString DocMethodLink(this HtmlHelper helper, MsDocEntryPoint section, MsDocEntryPointMethod method) { return DocMethodLink(helper, section, method, null); }
public static MvcHtmlString DocMethodLink(this HtmlHelper helper, MsDocEntryPoint section, MsDocEntryPointMethod method) { return(DocMethodLink(helper, section, method, null)); }
public static string DocUrl(this UrlHelper url, MsDocEntryPoint section, MsDocEntryPointMethod method) { return url.DocUrl(section.Name, method.HttpMethod, method.Path); }
public void Add(string text, MsDocEntryPoint section, MsDocEntryPointMethod method, object controller) { Add(text, Url.GetDocUrl(section, method, controller, _context.ControllerContext.RequestContext)); }
public static string GetRouteName(MsDocEntryPoint section, MsDocEntryPointMethod method) { var sectionName = section != null ? section.Name : null; return method == null ? GetRouteName(sectionName, null, null, null) : GetRouteName(sectionName, method.Category, method.HttpMethod, method.Path); }
public static string DocUrl(this UrlHelper url, MsDocEntryPoint section, MsDocEntryPointMethod method) { return(url.DocUrl(section.Name, method.HttpMethod, method.Path)); }
public SectionMethodViewModel(MsDocEntryPoint section, MsDocEntryPointMethod method) { Section = section; Method = method; }
public MethodViewModel(MsDocEntryPoint section, MsDocEntryPointMethod method) { Section = section; Method = method; }
public static MvcHtmlString DocMethodLink(this HtmlHelper helper, MsDocEntryPoint section, MsDocEntryPointMethod method, object htmlAttributes) { return(DocMethodLink(helper, section.Name, method.HttpMethod, method.Path, htmlAttributes)); }
public static MvcHtmlString DocMethodLink(this HtmlHelper helper, MsDocEntryPoint section, MsDocEntryPointMethod method) { var type = method.HttpMethod; var path = method.Path; var controller = helper.ViewContext.RequestContext.RouteData.Values["controller"]; var context = helper.ViewContext.RequestContext; var spanMethod = new TagBuilder("span"); spanMethod.AddCssClass("http-" + type.ToLowerInvariant()); spanMethod.InnerHtml = HttpUtility.HtmlEncode(type); var tagBuilder = new TagBuilder("a") { InnerHtml = spanMethod.ToString(TagRenderMode.Normal) + " " + HttpUtility.HtmlEncode(path) }; tagBuilder.AddCssClass("underline"); tagBuilder.MergeAttribute("href", Url.GetDocUrl(section, method, controller, context)); return(MvcHtmlString.Create(tagBuilder.ToString(TagRenderMode.Normal))); }
public static MvcHtmlString DocMethodLink(this HtmlHelper helper, MsDocEntryPoint section, MsDocEntryPointMethod method, object htmlAttributes) { return DocMethodLink(helper, section.Name, method.HttpMethod, method.Path, htmlAttributes); }
public static string GetDocUrl(MsDocEntryPoint section, MsDocEntryPointMethod method, object controller, RequestContext context) { var sectionName = section != null ? section.Name : null; return method == null ? GetDocUrl(sectionName, null, null, null, controller, context) : GetDocUrl(sectionName, method.Category, method.HttpMethod, method.Path, controller, context); }