コード例 #1
0
ファイル: PathNormalizer.cs プロジェクト: MadeByMars/Ironclad
        // Invariant: input is an absolute path, free of ..s, lowercased, with
        // normalized path separators.
        // Based on suggestions in http://stackoverflow.com/questions/1214513/normalize-directory-names-in-c-sharp.
        private string normalizePath(string requestPath, bool presumedDirectory)
        {
            string lowerPath = requestPath.ToLower(CultureInfo.InvariantCulture);

            if (this.cache.ContainsKey(lowerPath))
            {
                return(this.cache[lowerPath]);
            }

            string rc = PathNormalizer.normalizePath_nocache(requestPath, presumedDirectory);

            this.cache[lowerPath] = rc;
            return(rc);
        }
コード例 #2
0
ファイル: PathNormalizer.cs プロジェクト: MadeByMars/Ironclad
 public static string dbg_normalizePath_nocache(string requestPath, bool presumedDirectory)
 {
     return(PathNormalizer.normalizePath_nocache(requestPath, presumedDirectory));
 }