Esempio n. 1
0
 public IEnumerable<int> AllVersions(TextContent content)
 {
     ContentVersionPath versionPath = new ContentVersionPath(content);
     if (Directory.Exists(versionPath.PhysicalPath))
     {
         foreach (var file in Directory.EnumerateFiles(versionPath.PhysicalPath))
         {
             string fileName = Path.GetFileNameWithoutExtension(file);
             int version;
             if (int.TryParse(fileName, out version))
             {
                 yield return version;
             }
         }
     }
 }
Esempio n. 2
0
        public IEnumerable <int> AllVersions(TextContent content)
        {
            ContentVersionPath versionPath = new ContentVersionPath(content);

            if (Directory.Exists(versionPath.PhysicalPath))
            {
                foreach (var file in Directory.EnumerateFiles(versionPath.PhysicalPath))
                {
                    string fileName = Path.GetFileNameWithoutExtension(file);
                    int    version;
                    if (int.TryParse(fileName, out version))
                    {
                        yield return(version);
                    }
                }
            }
        }
Esempio n. 3
0
 private string GetVersionFile(TextContent content, int version)
 {
     ContentVersionPath versionPath = new ContentVersionPath(content);
     return Path.Combine(versionPath.PhysicalPath, string.Format("{0}.xml", version));
 }
Esempio n. 4
0
        private string GetVersionFile(TextContent content, int version)
        {
            ContentVersionPath versionPath = new ContentVersionPath(content);

            return(Path.Combine(versionPath.PhysicalPath, string.Format("{0}.xml", version)));
        }