public static string GetUrl(OmniboxResult result) { if (result is HelpOmniboxResult) { return(null); } return(Providers[result.GetType()].GetUrlUntyped(result)); }
public static MvcHtmlString Render(OmniboxResult result) { var helpResult = result as HelpOmniboxResult; if (helpResult != null) { var innerHtml = MvcHtmlString.Create(helpResult.Text.Replace("(", "<b>").Replace(")", "</b>")); if (helpResult.ReferencedType != null) { var icon = Providers[helpResult.ReferencedType].Icon(); innerHtml = icon.Concat(innerHtml); } return(new HtmlTag("span").InnerHtml(innerHtml) .Attr("style", "font-style: italic;") .ToHtml()); } else { return(Providers[result.GetType()].RenderHtmlUntyped(result)); } }