public ResourceMiddleware(OwinMiddleware next) : base(next) { resourceWebRequestFactory = new ResourceWebRequestFactory(); resourceWebRequestFactory.PluginAliasMap = base.pluginAliasDict; resourceWebRequestFactory.AssemblyMap = new Dictionary<String, Assembly>(); //注册resource:前缀URI处理程序 WebRequest.RegisterPrefix("resource:", resourceWebRequestFactory); }
public ResourceMiddleware(OwinMiddleware next) : base(next) { var properties = Server.Instance.properties; if (properties.ContainsKey("Quick.OwinMVC.resourceExpires")) resourceExpires = double.Parse(properties["Quick.OwinMVC.useMd5ETag"]); if (properties.ContainsKey("Quick.OwinMVC.resourceExpires")) useMd5ETag = Boolean.Parse(properties["Quick.OwinMVC.useMd5ETag"]); resourceWebRequestFactory = new ResourceWebRequestFactory(); resourceWebRequestFactory.PluginAliasMap = base.pluginAliasDict; resourceWebRequestFactory.AssemblyMap = new Dictionary<String, Assembly>(); //注册resource:前缀URI处理程序 WebRequest.RegisterPrefix("resource:", resourceWebRequestFactory); }