This commit is contained in:
@@ -132,12 +132,15 @@ namespace VEPROMS.CSLA.Library
|
||||
while (_CacheList.Count > 0) // Move Content(s) from temporary _CacheList to _CacheByPrimaryKey
|
||||
{
|
||||
Content tmp = _CacheList[0]; // Get the first Content
|
||||
string pKey = tmp.ContentID.ToString();
|
||||
if (!_CacheByPrimaryKey.ContainsKey(pKey))
|
||||
if (!tmp.Disposed)
|
||||
{
|
||||
_CacheByPrimaryKey[pKey] = new List<Content>(); // Add new list for PrimaryKey
|
||||
string pKey = tmp.ContentID.ToString();
|
||||
if (!_CacheByPrimaryKey.ContainsKey(pKey))
|
||||
{
|
||||
_CacheByPrimaryKey[pKey] = new List<Content>(); // Add new list for PrimaryKey
|
||||
}
|
||||
_CacheByPrimaryKey[pKey].Add(tmp); // Add to Primary Key list
|
||||
}
|
||||
_CacheByPrimaryKey[pKey].Add(tmp); // Add to Primary Key list
|
||||
_CacheList.RemoveAt(0); // Remove the first Content
|
||||
}
|
||||
}
|
||||
@@ -842,6 +845,13 @@ namespace VEPROMS.CSLA.Library
|
||||
{/* require use of factory methods */
|
||||
AddToCache(this);
|
||||
}
|
||||
private bool _Disposed = false;
|
||||
|
||||
public bool Disposed
|
||||
{
|
||||
get { return _Disposed; }
|
||||
set { _Disposed = value; }
|
||||
}
|
||||
public void Dispose()
|
||||
{
|
||||
if (_MyGrid != null)
|
||||
@@ -849,6 +859,7 @@ namespace VEPROMS.CSLA.Library
|
||||
_MyGrid.Dispose();
|
||||
_MyGrid = null;
|
||||
}
|
||||
Disposed = true;
|
||||
RemoveFromDictionaries();
|
||||
}
|
||||
private void RemoveFromDictionaries()
|
||||
|
Reference in New Issue
Block a user