Example #1
0
 public static DataTable Get(TableKey tableKey)
 {
     lock (_lock)
     {
         return _cache.ContainsKey(tableKey.Value) ? _cache[tableKey.Value] : null;
     }
 }
 public static DataTable Get(TableKey tableKey)
 {
     lock (_lock)
     {
         return(_cache.ContainsKey(tableKey.Value) ? _cache[tableKey.Value] : null);
     }
 }
Example #3
0
 public static void Put(TableKey tableKey, DataTable datatable)
 {
     lock (_lock)
     {
         if (Get(tableKey) != null)
         {
             throw new Exception(string.Format("{0} doesn't exist", tableKey));
         }
         _cache[tableKey.Value] = datatable;
     }
 }
 public static void Put(TableKey tableKey, DataTable datatable)
 {
     lock (_lock)
     {
         if (Get(tableKey) != null)
         {
             throw new Exception(string.Format("{0} doesn't exist", tableKey));
         }
         _cache[tableKey.Value] = datatable;
     }
 }