Exemplo n.º 1
0
 /// <summary>
 /// Gets all benchamrks and caches them. Looks for folder Benchmarks and traverses paths up until found
 /// </summary>
 public static List <Benchmark> GetBenchmarks(SpringPaths paths, bool refresh = false)
 {
     if (refresh)
     {
         allBenchmarks = null;
     }
     if (allBenchmarks != null)
     {
         return(allBenchmarks);
     }
     allBenchmarks = new List <Benchmark>();
     allBenchmarks = Batch.GetBenchmarkFolders(paths, "games").SelectMany(x => x.GetDirectories("*.sdd").Select(y => new Benchmark(y.FullName))).ToList();
     return(allBenchmarks);
 }
Exemplo n.º 2
0
 public static IEnumerable <Config> GetConfigs(SpringPaths paths, bool refresh = false)
 {
     if (refresh)
     {
         allConfigs = null;
     }
     if (allConfigs != null)
     {
         return(allConfigs);
     }
     allConfigs = new List <Config>();
     allConfigs = Batch.GetBenchmarkFolders(paths, "Configs").SelectMany(x => x.GetDirectories().Select(y => new Config(y.FullName))).ToList();
     return(allConfigs);
 }
Exemplo n.º 3
0
 public static IEnumerable <StartScript> GetStartScripts(SpringPaths paths, bool refresh = false)
 {
     if (refresh)
     {
         allStartScripts = null;
     }
     if (allStartScripts != null)
     {
         return(allStartScripts);
     }
     allStartScripts = new List <StartScript>();
     allStartScripts =
         Batch.GetBenchmarkFolders(paths, "Scripts").SelectMany(x => x.GetFiles("*.txt").Select(y => new StartScript(y.FullName))).ToList();
     return(allStartScripts);
 }