Beispiel #1
0
        T Initialize0()
        {
            var value = Initialize();

            Set(ThreadLocalMap.GetMap(), index, value);
            return(value);
        }
Beispiel #2
0
 public static ThreadLocalMap GetMap()
 {
     if (map == null)
     {
         map = new ThreadLocalMap(DefaultVariableCounter);
     }
     return(map);
 }
Beispiel #3
0
        protected static T Get(ThreadLocalMap map, int index)
        {
            object val = map.Get(index);

            if (val != null)
            {
                return((T)val);
            }

            return(NewObjectFactory().Initialize0());
        }
Beispiel #4
0
 protected static void Set(ThreadLocalMap map, int index, T value)
 {
     map.Set(index, value);
 }
Beispiel #5
0
 protected static T Get()
 {
     return(Get(ThreadLocalMap.GetMap(), index));
 }