Exemplo n.º 1
0
        public static void ParseTitle(Benchmark.INumberedBenchmarkObject numberedBenchmarkObject, Benchmark.INamedBenchmarkObject namedBenchmarkObject, string title)
        {
            int index1 = title.IndexOf("[");
            int index2 = title.IndexOf("]");

            if (index1 >= 0 && index2 > index1)
            {
                string number = title.Substring(index1 + 1, index2 - index1 - 1).Trim();
                string name   = title.Substring(index2 + 1).Trim();
                numberedBenchmarkObject.Number = number;
                namedBenchmarkObject.Name      = name;
            }
            else
            {
                namedBenchmarkObject.Name = title.Trim();
            }
        }
Exemplo n.º 2
0
 public static string GetTitle(Benchmark.INumberedBenchmarkObject numberedObject, Benchmark.INamedBenchmarkObject namedBenchmarkObject)
 {
     return(GetTitle(numberedObject.Number, namedBenchmarkObject.Name));
 }