Esempio n. 1
0
        private SprocketFile LoadCacheSprocketFile(string sprocketPath)
        {
            if (HttpContext.Current.Application["SprocketFileManager"] == null)
            {
                HttpContext.Current.Application["SprocketFileManager"] = new Dictionary <string, SprocketFile>();
            }
            Dictionary <string, SprocketFile> files = (Dictionary <string, SprocketFile>)HttpContext.Current.Application["SprocketFileManager"];

            SprocketFile file;

            if (!files.ContainsKey(sprocketPath))
            {
                file = SprocketFile.Load(sprocketPath);
                files[sprocketPath] = file;
            }
            else
            {
                file = files[sprocketPath];
            }
            return(file);
        }