コード例 #1
0
ファイル: HtmlHelperX.cs プロジェクト: leventesen/L24CM
        public static string RegisterCss(this HtmlHelper html, string css)
        {
            ExtendedController clr = html.ViewContext.Controller as ExtendedController;

            clr.RegisterCss(css);
            return("");
        }
コード例 #2
0
ファイル: HtmlHelperX.cs プロジェクト: leventesen/L24CM
        public static string RegisterHtmlBlock(this HtmlHelper html, string id, string htmlBlock)
        {
            ExtendedController clr = html.ViewContext.Controller as ExtendedController;

            clr.RegisterHtml(id, htmlBlock);
            return("");
        }
コード例 #3
0
ファイル: HtmlHelperX.cs プロジェクト: leventesen/L24CM
        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("");
        }
コード例 #4
0
ファイル: HtmlHelperX.cs プロジェクト: leventesen/L24CM
        public static string RegisterScript(this HtmlHelper html, string script)
        {
            ExtendedController clr = html.ViewContext.Controller as ExtendedController;

            clr.RegisterScript(script);
            return("");
        }
コード例 #5
0
        protected void Application_Start()
        {
            AreaRegistration.RegisterAllAreas();
            RegisterGlobalFilters(GlobalFilters.Filters);
            RegisterRoutes(RouteTable.Routes);


            ControllerBuilder.Current.SetControllerFactory(new ServiceLocatableControllerFactory());
            ExtendedController.RegisterExceptionPolicy("WebUI");
        }
コード例 #6
0
        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));
        }
コード例 #7
0
ファイル: IncludesFilter.cs プロジェクト: leventesen/L24CM
 public IncludesFilter(Stream s, ExtendedController controller)
 {
     sw = new StreamWriter(s);
     this.controller = controller;
 }