public static string RegisterCss(this HtmlHelper html, string css) { ExtendedController clr = html.ViewContext.Controller as ExtendedController; clr.RegisterCss(css); return(""); }
public static string RegisterHtmlBlock(this HtmlHelper html, string id, string htmlBlock) { ExtendedController clr = html.ViewContext.Controller as ExtendedController; clr.RegisterHtml(id, htmlBlock); return(""); }
public static string RegisterScript(this HtmlHelper html, string id, string script, List <string> dependencies) { ExtendedController clr = html.ViewContext.Controller as ExtendedController; clr.RegisterScript(id, script, dependencies); return(""); }
public static string RegisterScript(this HtmlHelper html, string script) { ExtendedController clr = html.ViewContext.Controller as ExtendedController; clr.RegisterScript(script); return(""); }
protected void Application_Start() { AreaRegistration.RegisterAllAreas(); RegisterGlobalFilters(GlobalFilters.Filters); RegisterRoutes(RouteTable.Routes); ControllerBuilder.Current.SetControllerFactory(new ServiceLocatableControllerFactory()); ExtendedController.RegisterExceptionPolicy("WebUI"); }
public IViewComponentResult Invoke() { List <string> Types = new List <string>(); int i = 1; do { Types.Add(ExtendedController.APIRequest($"https://pokeapi.co/api/v2/type/{i}").ToObject <PokeType>().name); } while (!string.IsNullOrEmpty(Types.Last())); return(View(Types)); }
public IncludesFilter(Stream s, ExtendedController controller) { sw = new StreamWriter(s); this.controller = controller; }