Пример #1
0
        public static string LineObjectiveName(string className, int line)
        {
            var map =
                LineCache.ComputeIfAbsent(className,
                                          c => new ConcurrentDictionary <int, string>()); //TODO: capacity 1000

            return(map.ComputeIfAbsent(line,
                                       l => LINE + "_at_" + ClassName.Get(className).GetFullNameWithDots() + "_" + PadNumber(line)));

//        string name = LINE + "_at_" + ClassName.get(className).getFullNameWithDots() + "_" + padNumber(line);
//        return name;//.intern();
        }
Пример #2
0
        public static string SuccessCallObjectiveName(string className, int line, int index)
        {
            var m0 =
                CacheSuccessCall.ComputeIfAbsent(className,
                                                 c => new ConcurrentDictionary <int, IDictionary <int, string> >()); //TODO: capacity 10_000
            var
                m1 = m0.ComputeIfAbsent(line, l => new ConcurrentDictionary <int, string>());                        //TODO: capacity 10

            return(m1.ComputeIfAbsent(index, i =>
                                      SUCCESS_CALL + "_at_" + ClassName.Get(className).GetFullNameWithDots() +
                                      "_" + PadNumber(line) + "_" + index));
        }
Пример #3
0
 public static string ClassObjectiveName(string className)
 {
     return(CacheClass.ComputeIfAbsent(className, c => CLASS + "_" + ClassName.Get(c).GetFullNameWithDots()));
     //string name = CLASS + "_" + ClassName.get(className).getFullNameWithDots();
     //return name;//.intern();
 }