private IEnumerable<string> EnumeratePaths(string path, CultureInfo culture = null)
        {
            Contract.Requires(path != null);

            var filePath = Path.Combine(_baseDirectory, path.Replace('/', Path.DirectorySeparatorChar));
            var directory = Path.GetDirectoryName(filePath);
            var name = Path.Combine(directory ?? "\\", Path.GetFileNameWithoutExtension(filePath));
            var extension = Path.GetExtension(filePath);
            var localizedName = new LocalizedName(name, culture);
            return localizedName.GetPossibleNames()
                .Select(x => string.Format("{0}{1}", x, extension));
        }
Example #2
0
        private IEnumerable <string> EnumeratePaths(string path, CultureInfo culture = null)
        {
            Contract.Requires(path != null);

            var filePath      = Path.Combine(_baseDirectory, path.Replace('/', Path.DirectorySeparatorChar));
            var directory     = Path.GetDirectoryName(filePath);
            var name          = Path.Combine(directory ?? "\\", Path.GetFileNameWithoutExtension(filePath));
            var extension     = Path.GetExtension(filePath);
            var localizedName = new LocalizedName(name, culture);

            return(localizedName.GetPossibleNames()
                   .Select(x => string.Format("{0}{1}", x, extension)));
        }