diff --git a/PROMS/VEPROMS.CSLA.Library/Generated/ItemInfo.cs b/PROMS/VEPROMS.CSLA.Library/Generated/ItemInfo.cs index e0c534ee..85c3446c 100644 --- a/PROMS/VEPROMS.CSLA.Library/Generated/ItemInfo.cs +++ b/PROMS/VEPROMS.CSLA.Library/Generated/ItemInfo.cs @@ -39,22 +39,23 @@ namespace VEPROMS.CSLA.Library private static List _CacheList = new List(); protected static void AddToCache(ItemInfo itemInfo) { - //if (!_CacheList.Contains(itemInfo)) - try - { + if (!_CacheList.Contains(itemInfo)) _CacheList.Add(itemInfo); // In AddToCache - } - catch (Exception ex) - { - _MyLog.ErrorFormat("ItemInfo {0}.{1} already exists in the cache", itemInfo.ItemID,itemInfo.MyItemInfoUnique); - } + //try + //{ + // _CacheList.Add(itemInfo); // In AddToCache + //} + //catch (Exception ex) + //{ + // _MyLog.ErrorFormat("ItemInfo {0}.{1} already exists in the cache", itemInfo.ItemID, itemInfo.MyItemInfoUnique); + //} } protected static void RemoveFromCache(ItemInfo itemInfo) { while (_CacheList.Contains(itemInfo)) _CacheList.Remove(itemInfo); // In RemoveFromCache } - private static Dictionary> _CacheByPrimaryKey = new Dictionary>(); - private static void ConvertListToDictionary() + protected static Dictionary> _CacheByPrimaryKey = new Dictionary>(); + protected static void ConvertListToDictionary() { while (_CacheList.Count > 0) // Move ItemInfo(s) from temporary _CacheList to _CacheByPrimaryKey { @@ -428,7 +429,7 @@ namespace VEPROMS.CSLA.Library { get { return _MyItemInfoUnique; } } protected ItemInfo() {/* require use of factory methods */ - AddToCache(this); + //AddToCache(this); } private bool _Disposed = false; private static int _CountCreated = 0; @@ -578,7 +579,7 @@ namespace VEPROMS.CSLA.Library _ItemID = itemID; } } - private void ReadData(SafeDataReader dr) + protected void ReadData(SafeDataReader dr) { if (_MyLog.IsDebugEnabled) _MyLog.DebugFormat("[{0}] ItemInfo.ReadData", GetHashCode()); try