Ejemplo n.º 1
0
 public FilterFieldsScript(string name, Func <IEnumerable <FilterField> > getFields)
 {
     _getFields  = getFields;
     _name       = name;
     _scriptName = "FilterFields." + name;
     DynamicScriptManager.Register(this);
 }
        public void ProcessRequest(HttpContext context)
        {
            var request = context.Request;

            DynamicScriptManager.IfNotRegistered("BundleCss", () =>
            {
                DynamicScriptManager.Register("BundleCss",
                                              new ConcatenatedScript(new Func <string>[] {
                    () => {
                        using (var sr = new StreamReader(
                                   HostingEnvironment.MapPath("~/Content/bundle.css")))
                            return(sr.ReadToEnd());
                    }
                }));
            });

            DynamicScriptHandler.ProcessScriptRequest(context, "BundleCss", "text/css");
        }
Ejemplo n.º 3
0
 public static TScript Register <TScript>(this TScript script)
     where TScript : INamedDynamicScript
 {
     DynamicScriptManager.Register(script);
     return(script);
 }