示例#1
0
文件: Menu.cs 项目: hchiam/sar-tool
 void Button4Click(object sender, EventArgs e)
 {
     foreach (string resource in EmbeddedResource.GetAllResources())
     {
         System.Diagnostics.Debug.WriteLine(resource);
     }
 }
示例#2
0
        public HttpCache(HttpServer server)
        {
            this.cache  = new Dictionary <string, HttpCachedFile>();
            this.server = server;

            // read all embedded resources
            foreach (var file in EmbeddedResource.GetAllResources())
            {
                var request = file.ToLower();
                cache.Add(request, new HttpCachedEmbeddedFile(file));
            }

            // read all files on root folder
            foreach (var file in IO.GetAllFiles(server.Root))
            {
                var request = file.Substring(server.Root.Length + 1).ToLower();
                cache.Add(request, new HttpCachedFile(file));
            }
        }