Added Memory Tracking Code

This commit is contained in:
Rich 2012-05-21 13:34:22 +00:00
parent c8de9f8538
commit ab1cd8af42
202 changed files with 4617 additions and 122 deletions

View File

@ -37,9 +37,13 @@ namespace VEPROMS.CSLA.Library
if (IsDirty) if (IsDirty)
refreshAnnotations.Add(this); refreshAnnotations.Add(this);
} }
private void BuildRefreshList() private void ClearRefreshList()
{ {
_RefreshAnnotations = new List<Annotation>(); _RefreshAnnotations = new List<Annotation>();
}
private void BuildRefreshList()
{
ClearRefreshList();
AddToRefreshList(_RefreshAnnotations); AddToRefreshList(_RefreshAnnotations);
} }
private void ProcessRefreshList() private void ProcessRefreshList()
@ -50,6 +54,7 @@ namespace VEPROMS.CSLA.Library
if (tmp._MyAnnotationType != null) AnnotationTypeInfo.Refresh(tmp._MyAnnotationType); if (tmp._MyAnnotationType != null) AnnotationTypeInfo.Refresh(tmp._MyAnnotationType);
if (tmp._MyItem != null) ItemInfo.Refresh(tmp._MyItem); if (tmp._MyItem != null) ItemInfo.Refresh(tmp._MyItem);
} }
ClearRefreshList();
} }
#endregion #endregion
#region Collection #region Collection
@ -479,8 +484,28 @@ namespace VEPROMS.CSLA.Library
{/* require use of factory methods */ {/* require use of factory methods */
AddToCache(this); AddToCache(this);
} }
private bool _Disposed = false;
private static int _CountCreated = 0;
private static int _CountDisposed = 0;
private static int _CountFinalized = 0;
private static int IncrementCountCreated
{ get { return ++_CountCreated; } }
private int _CountWhenCreated = IncrementCountCreated;
public static int CountCreated
{ get { return _CountCreated; } }
public static int CountNotDisposed
{ get { return _CountCreated - _CountDisposed; } }
public static int CountNotFinalized
{ get { return _CountCreated - _CountFinalized; } }
~Annotation()
{
_CountFinalized++;
}
public void Dispose() public void Dispose()
{ {
if (_Disposed) return;
_CountDisposed++;
_Disposed = true;
RemoveFromDictionaries(); RemoveFromDictionaries();
} }
private void RemoveFromDictionaries() private void RemoveFromDictionaries()

View File

@ -37,9 +37,13 @@ namespace VEPROMS.CSLA.Library
if (IsDirty) if (IsDirty)
refreshAnnotationAudits.Add(this); refreshAnnotationAudits.Add(this);
} }
private void BuildRefreshList() private void ClearRefreshList()
{ {
_RefreshAnnotationAudits = new List<AnnotationAudit>(); _RefreshAnnotationAudits = new List<AnnotationAudit>();
}
private void BuildRefreshList()
{
ClearRefreshList();
AddToRefreshList(_RefreshAnnotationAudits); AddToRefreshList(_RefreshAnnotationAudits);
} }
private void ProcessRefreshList() private void ProcessRefreshList()
@ -48,6 +52,7 @@ namespace VEPROMS.CSLA.Library
{ {
AnnotationAuditInfo.Refresh(tmp); AnnotationAuditInfo.Refresh(tmp);
} }
ClearRefreshList();
} }
#endregion #endregion
#region Collection #region Collection
@ -461,8 +466,28 @@ namespace VEPROMS.CSLA.Library
{/* require use of factory methods */ {/* require use of factory methods */
AddToCache(this); AddToCache(this);
} }
private bool _Disposed = false;
private static int _CountCreated = 0;
private static int _CountDisposed = 0;
private static int _CountFinalized = 0;
private static int IncrementCountCreated
{ get { return ++_CountCreated; } }
private int _CountWhenCreated = IncrementCountCreated;
public static int CountCreated
{ get { return _CountCreated; } }
public static int CountNotDisposed
{ get { return _CountCreated - _CountDisposed; } }
public static int CountNotFinalized
{ get { return _CountCreated - _CountFinalized; } }
~AnnotationAudit()
{
_CountFinalized++;
}
public void Dispose() public void Dispose()
{ {
if (_Disposed) return;
_CountDisposed++;
_Disposed = true;
RemoveFromDictionaries(); RemoveFromDictionaries();
} }
private void RemoveFromDictionaries() private void RemoveFromDictionaries()

View File

@ -220,8 +220,28 @@ namespace VEPROMS.CSLA.Library
{/* require use of factory methods */ {/* require use of factory methods */
AddToCache(this); AddToCache(this);
} }
private bool _Disposed = false;
private static int _CountCreated = 0;
private static int _CountDisposed = 0;
private static int _CountFinalized = 0;
private static int IncrementCountCreated
{ get { return ++_CountCreated; } }
private int _CountWhenCreated = IncrementCountCreated;
public static int CountCreated
{ get { return _CountCreated; } }
public static int CountNotDisposed
{ get { return _CountCreated - _CountDisposed; } }
public static int CountNotFinalized
{ get { return _CountCreated - _CountFinalized; } }
~AnnotationAuditInfo()
{
_CountFinalized++;
}
public void Dispose() public void Dispose()
{ {
if (_Disposed) return;
_CountDisposed++;
_Disposed = true;
RemoveFromCache(this); RemoveFromCache(this);
if (!_CacheByPrimaryKey.ContainsKey(AuditID.ToString())) return; if (!_CacheByPrimaryKey.ContainsKey(AuditID.ToString())) return;
List<AnnotationAuditInfo> listAnnotationAuditInfo = _CacheByPrimaryKey[AuditID.ToString()]; // Get the list of items List<AnnotationAuditInfo> listAnnotationAuditInfo = _CacheByPrimaryKey[AuditID.ToString()]; // Get the list of items

View File

@ -47,8 +47,28 @@ namespace VEPROMS.CSLA.Library
this.OnListChanged(new ListChangedEventArgs(ListChangedType.ItemChanged, i)); this.OnListChanged(new ListChangedEventArgs(ListChangedType.ItemChanged, i));
} }
} }
private bool _Disposed = false;
private static int _CountCreated = 0;
private static int _CountDisposed = 0;
private static int _CountFinalized = 0;
private static int IncrementCountCreated
{ get { return ++_CountCreated; } }
private int _CountWhenCreated = IncrementCountCreated;
public static int CountCreated
{ get { return _CountCreated; } }
public static int CountNotDisposed
{ get { return _CountCreated - _CountDisposed; } }
public static int CountNotFinalized
{ get { return _CountCreated - _CountFinalized; } }
~AnnotationAuditInfoList()
{
_CountFinalized++;
}
public void Dispose() public void Dispose()
{ {
if (_Disposed) return;
_CountDisposed++;
_Disposed = true;
foreach (AnnotationAuditInfo tmp in this) foreach (AnnotationAuditInfo tmp in this)
{ {
tmp.Changed -= new AnnotationAuditInfoEvent(tmp_Changed); tmp.Changed -= new AnnotationAuditInfoEvent(tmp_Changed);

View File

@ -237,8 +237,28 @@ namespace VEPROMS.CSLA.Library
{/* require use of factory methods */ {/* require use of factory methods */
AddToCache(this); AddToCache(this);
} }
private bool _Disposed = false;
private static int _CountCreated = 0;
private static int _CountDisposed = 0;
private static int _CountFinalized = 0;
private static int IncrementCountCreated
{ get { return ++_CountCreated; } }
private int _CountWhenCreated = IncrementCountCreated;
public static int CountCreated
{ get { return _CountCreated; } }
public static int CountNotDisposed
{ get { return _CountCreated - _CountDisposed; } }
public static int CountNotFinalized
{ get { return _CountCreated - _CountFinalized; } }
~AnnotationInfo()
{
_CountFinalized++;
}
public void Dispose() public void Dispose()
{ {
if (_Disposed) return;
_CountDisposed++;
_Disposed = true;
RemoveFromCache(this); RemoveFromCache(this);
if (!_CacheByPrimaryKey.ContainsKey(AnnotationID.ToString())) return; if (!_CacheByPrimaryKey.ContainsKey(AnnotationID.ToString())) return;
List<AnnotationInfo> listAnnotationInfo = _CacheByPrimaryKey[AnnotationID.ToString()]; // Get the list of items List<AnnotationInfo> listAnnotationInfo = _CacheByPrimaryKey[AnnotationID.ToString()]; // Get the list of items

View File

@ -47,8 +47,28 @@ namespace VEPROMS.CSLA.Library
this.OnListChanged(new ListChangedEventArgs(ListChangedType.ItemChanged, i)); this.OnListChanged(new ListChangedEventArgs(ListChangedType.ItemChanged, i));
} }
} }
private bool _Disposed = false;
private static int _CountCreated = 0;
private static int _CountDisposed = 0;
private static int _CountFinalized = 0;
private static int IncrementCountCreated
{ get { return ++_CountCreated; } }
private int _CountWhenCreated = IncrementCountCreated;
public static int CountCreated
{ get { return _CountCreated; } }
public static int CountNotDisposed
{ get { return _CountCreated - _CountDisposed; } }
public static int CountNotFinalized
{ get { return _CountCreated - _CountFinalized; } }
~AnnotationInfoList()
{
_CountFinalized++;
}
public void Dispose() public void Dispose()
{ {
if (_Disposed) return;
_CountDisposed++;
_Disposed = true;
foreach (AnnotationInfo tmp in this) foreach (AnnotationInfo tmp in this)
{ {
tmp.Changed -= new AnnotationInfoEvent(tmp_Changed); tmp.Changed -= new AnnotationInfoEvent(tmp_Changed);

View File

@ -45,10 +45,14 @@ namespace VEPROMS.CSLA.Library
} }
} }
} }
private void BuildRefreshList() private void ClearRefreshList()
{ {
_RefreshAnnotationTypes = new List<AnnotationType>(); _RefreshAnnotationTypes = new List<AnnotationType>();
_RefreshAnnotationTypeAnnotations = new List<AnnotationTypeAnnotation>(); _RefreshAnnotationTypeAnnotations = new List<AnnotationTypeAnnotation>();
}
private void BuildRefreshList()
{
ClearRefreshList();
AddToRefreshList(_RefreshAnnotationTypes, _RefreshAnnotationTypeAnnotations); AddToRefreshList(_RefreshAnnotationTypes, _RefreshAnnotationTypeAnnotations);
} }
private void ProcessRefreshList() private void ProcessRefreshList()
@ -61,6 +65,7 @@ namespace VEPROMS.CSLA.Library
{ {
AnnotationInfo.Refresh(tmp); AnnotationInfo.Refresh(tmp);
} }
ClearRefreshList();
} }
#endregion #endregion
#region Collection #region Collection
@ -435,8 +440,28 @@ namespace VEPROMS.CSLA.Library
{/* require use of factory methods */ {/* require use of factory methods */
AddToCache(this); AddToCache(this);
} }
private bool _Disposed = false;
private static int _CountCreated = 0;
private static int _CountDisposed = 0;
private static int _CountFinalized = 0;
private static int IncrementCountCreated
{ get { return ++_CountCreated; } }
private int _CountWhenCreated = IncrementCountCreated;
public static int CountCreated
{ get { return _CountCreated; } }
public static int CountNotDisposed
{ get { return _CountCreated - _CountDisposed; } }
public static int CountNotFinalized
{ get { return _CountCreated - _CountFinalized; } }
~AnnotationType()
{
_CountFinalized++;
}
public void Dispose() public void Dispose()
{ {
if (_Disposed) return;
_CountDisposed++;
_Disposed = true;
RemoveFromDictionaries(); RemoveFromDictionaries();
} }
private void RemoveFromDictionaries() private void RemoveFromDictionaries()

View File

@ -25,7 +25,7 @@ namespace VEPROMS.CSLA.Library
/// </summary> /// </summary>
[Serializable()] [Serializable()]
[TypeConverter(typeof(AnnotationTypeAnnotationConverter))] [TypeConverter(typeof(AnnotationTypeAnnotationConverter))]
public partial class AnnotationTypeAnnotation : BusinessBase<AnnotationTypeAnnotation>, IVEHasBrokenRules public partial class AnnotationTypeAnnotation : BusinessBase<AnnotationTypeAnnotation>, IVEHasBrokenRules, IDisposable
{ {
#region Log4Net #region Log4Net
private static readonly log4net.ILog _MyLog = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); private static readonly log4net.ILog _MyLog = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
@ -440,6 +440,29 @@ namespace VEPROMS.CSLA.Library
MarkAsChild(); MarkAsChild();
Fetch(dr); Fetch(dr);
} }
private bool _Disposed = false;
private static int _CountCreated = 0;
private static int _CountDisposed = 0;
private static int _CountFinalized = 0;
private static int IncrementCountCreated
{ get { return ++_CountCreated; } }
private int _CountWhenCreated = IncrementCountCreated;
public static int CountCreated
{ get { return _CountCreated; } }
public static int CountNotDisposed
{ get { return _CountCreated - _CountDisposed; } }
public static int CountNotFinalized
{ get { return _CountCreated - _CountFinalized; } }
~AnnotationTypeAnnotation()
{
_CountFinalized++;
}
public void Dispose()
{
if (_Disposed) return;
_CountDisposed++;
_Disposed = true;
}
#endregion #endregion
#region Data Access Portal #region Data Access Portal
private void Fetch(SafeDataReader dr) private void Fetch(SafeDataReader dr)

View File

@ -25,7 +25,7 @@ namespace VEPROMS.CSLA.Library
/// </summary> /// </summary>
[Serializable()] [Serializable()]
[TypeConverter(typeof(AnnotationTypeAnnotationsConverter))] [TypeConverter(typeof(AnnotationTypeAnnotationsConverter))]
public partial class AnnotationTypeAnnotations : BusinessListBase<AnnotationTypeAnnotations, AnnotationTypeAnnotation>, ICustomTypeDescriptor, IVEHasBrokenRules public partial class AnnotationTypeAnnotations : BusinessListBase<AnnotationTypeAnnotations, AnnotationTypeAnnotation>, ICustomTypeDescriptor, IVEHasBrokenRules , IDisposable
{ {
#region Log4Net #region Log4Net
private static readonly log4net.ILog _MyLog = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); private static readonly log4net.ILog _MyLog = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
@ -170,6 +170,29 @@ namespace VEPROMS.CSLA.Library
MarkAsChild(); MarkAsChild();
Fetch(dr); Fetch(dr);
} }
private bool _Disposed = false;
private static int _CountCreated = 0;
private static int _CountDisposed = 0;
private static int _CountFinalized = 0;
private static int IncrementCountCreated
{ get { return ++_CountCreated; } }
private int _CountWhenCreated = IncrementCountCreated;
public static int CountCreated
{ get { return _CountCreated; } }
public static int CountNotDisposed
{ get { return _CountCreated - _CountDisposed; } }
public static int CountNotFinalized
{ get { return _CountCreated - _CountFinalized; } }
~AnnotationTypeAnnotations()
{
_CountFinalized++;
}
public void Dispose()
{
if (_Disposed) return;
_CountDisposed++;
_Disposed = true;
}
#endregion #endregion
#region Data Access Portal #region Data Access Portal
// called to load data from the database // called to load data from the database

View File

@ -208,8 +208,28 @@ namespace VEPROMS.CSLA.Library
{/* require use of factory methods */ {/* require use of factory methods */
AddToCache(this); AddToCache(this);
} }
private bool _Disposed = false;
private static int _CountCreated = 0;
private static int _CountDisposed = 0;
private static int _CountFinalized = 0;
private static int IncrementCountCreated
{ get { return ++_CountCreated; } }
private int _CountWhenCreated = IncrementCountCreated;
public static int CountCreated
{ get { return _CountCreated; } }
public static int CountNotDisposed
{ get { return _CountCreated - _CountDisposed; } }
public static int CountNotFinalized
{ get { return _CountCreated - _CountFinalized; } }
~AnnotationTypeInfo()
{
_CountFinalized++;
}
public void Dispose() public void Dispose()
{ {
if (_Disposed) return;
_CountDisposed++;
_Disposed = true;
RemoveFromCache(this); RemoveFromCache(this);
if (!_CacheByPrimaryKey.ContainsKey(TypeID.ToString())) return; if (!_CacheByPrimaryKey.ContainsKey(TypeID.ToString())) return;
List<AnnotationTypeInfo> listAnnotationTypeInfo = _CacheByPrimaryKey[TypeID.ToString()]; // Get the list of items List<AnnotationTypeInfo> listAnnotationTypeInfo = _CacheByPrimaryKey[TypeID.ToString()]; // Get the list of items

View File

@ -54,8 +54,28 @@ namespace VEPROMS.CSLA.Library
this.OnListChanged(new ListChangedEventArgs(ListChangedType.ItemChanged, i)); this.OnListChanged(new ListChangedEventArgs(ListChangedType.ItemChanged, i));
} }
} }
private bool _Disposed = false;
private static int _CountCreated = 0;
private static int _CountDisposed = 0;
private static int _CountFinalized = 0;
private static int IncrementCountCreated
{ get { return ++_CountCreated; } }
private int _CountWhenCreated = IncrementCountCreated;
public static int CountCreated
{ get { return _CountCreated; } }
public static int CountNotDisposed
{ get { return _CountCreated - _CountDisposed; } }
public static int CountNotFinalized
{ get { return _CountCreated - _CountFinalized; } }
~AnnotationTypeInfoList()
{
_CountFinalized++;
}
public void Dispose() public void Dispose()
{ {
if (_Disposed) return;
_CountDisposed++;
_Disposed = true;
foreach (AnnotationTypeInfo tmp in this) foreach (AnnotationTypeInfo tmp in this)
{ {
tmp.Changed -= new AnnotationTypeInfoEvent(tmp_Changed); tmp.Changed -= new AnnotationTypeInfoEvent(tmp_Changed);

View File

@ -37,9 +37,13 @@ namespace VEPROMS.CSLA.Library
if (IsDirty) if (IsDirty)
refreshAssignments.Add(this); refreshAssignments.Add(this);
} }
private void BuildRefreshList() private void ClearRefreshList()
{ {
_RefreshAssignments = new List<Assignment>(); _RefreshAssignments = new List<Assignment>();
}
private void BuildRefreshList()
{
ClearRefreshList();
AddToRefreshList(_RefreshAssignments); AddToRefreshList(_RefreshAssignments);
} }
private void ProcessRefreshList() private void ProcessRefreshList()
@ -51,6 +55,7 @@ namespace VEPROMS.CSLA.Library
if (tmp._MyGroup != null) GroupInfo.Refresh(tmp._MyGroup); if (tmp._MyGroup != null) GroupInfo.Refresh(tmp._MyGroup);
if (tmp._MyRole != null) RoleInfo.Refresh(tmp._MyRole); if (tmp._MyRole != null) RoleInfo.Refresh(tmp._MyRole);
} }
ClearRefreshList();
} }
#endregion #endregion
#region Collection #region Collection
@ -542,8 +547,28 @@ namespace VEPROMS.CSLA.Library
{/* require use of factory methods */ {/* require use of factory methods */
AddToCache(this); AddToCache(this);
} }
private bool _Disposed = false;
private static int _CountCreated = 0;
private static int _CountDisposed = 0;
private static int _CountFinalized = 0;
private static int IncrementCountCreated
{ get { return ++_CountCreated; } }
private int _CountWhenCreated = IncrementCountCreated;
public static int CountCreated
{ get { return _CountCreated; } }
public static int CountNotDisposed
{ get { return _CountCreated - _CountDisposed; } }
public static int CountNotFinalized
{ get { return _CountCreated - _CountFinalized; } }
~Assignment()
{
_CountFinalized++;
}
public void Dispose() public void Dispose()
{ {
if (_Disposed) return;
_CountDisposed++;
_Disposed = true;
RemoveFromDictionaries(); RemoveFromDictionaries();
} }
private void RemoveFromDictionaries() private void RemoveFromDictionaries()

View File

@ -236,8 +236,28 @@ namespace VEPROMS.CSLA.Library
{/* require use of factory methods */ {/* require use of factory methods */
AddToCache(this); AddToCache(this);
} }
private bool _Disposed = false;
private static int _CountCreated = 0;
private static int _CountDisposed = 0;
private static int _CountFinalized = 0;
private static int IncrementCountCreated
{ get { return ++_CountCreated; } }
private int _CountWhenCreated = IncrementCountCreated;
public static int CountCreated
{ get { return _CountCreated; } }
public static int CountNotDisposed
{ get { return _CountCreated - _CountDisposed; } }
public static int CountNotFinalized
{ get { return _CountCreated - _CountFinalized; } }
~AssignmentInfo()
{
_CountFinalized++;
}
public void Dispose() public void Dispose()
{ {
if (_Disposed) return;
_CountDisposed++;
_Disposed = true;
RemoveFromCache(this); RemoveFromCache(this);
if (!_CacheByPrimaryKey.ContainsKey(AID.ToString())) return; if (!_CacheByPrimaryKey.ContainsKey(AID.ToString())) return;
List<AssignmentInfo> listAssignmentInfo = _CacheByPrimaryKey[AID.ToString()]; // Get the list of items List<AssignmentInfo> listAssignmentInfo = _CacheByPrimaryKey[AID.ToString()]; // Get the list of items

View File

@ -47,8 +47,28 @@ namespace VEPROMS.CSLA.Library
this.OnListChanged(new ListChangedEventArgs(ListChangedType.ItemChanged, i)); this.OnListChanged(new ListChangedEventArgs(ListChangedType.ItemChanged, i));
} }
} }
private bool _Disposed = false;
private static int _CountCreated = 0;
private static int _CountDisposed = 0;
private static int _CountFinalized = 0;
private static int IncrementCountCreated
{ get { return ++_CountCreated; } }
private int _CountWhenCreated = IncrementCountCreated;
public static int CountCreated
{ get { return _CountCreated; } }
public static int CountNotDisposed
{ get { return _CountCreated - _CountDisposed; } }
public static int CountNotFinalized
{ get { return _CountCreated - _CountFinalized; } }
~AssignmentInfoList()
{
_CountFinalized++;
}
public void Dispose() public void Dispose()
{ {
if (_Disposed) return;
_CountDisposed++;
_Disposed = true;
foreach (AssignmentInfo tmp in this) foreach (AssignmentInfo tmp in this)
{ {
tmp.Changed -= new AssignmentInfoEvent(tmp_Changed); tmp.Changed -= new AssignmentInfoEvent(tmp_Changed);

View File

@ -37,9 +37,13 @@ namespace VEPROMS.CSLA.Library
if (IsDirty) if (IsDirty)
refreshAssociations.Add(this); refreshAssociations.Add(this);
} }
private void BuildRefreshList() private void ClearRefreshList()
{ {
_RefreshAssociations = new List<Association>(); _RefreshAssociations = new List<Association>();
}
private void BuildRefreshList()
{
ClearRefreshList();
AddToRefreshList(_RefreshAssociations); AddToRefreshList(_RefreshAssociations);
} }
private void ProcessRefreshList() private void ProcessRefreshList()
@ -50,6 +54,7 @@ namespace VEPROMS.CSLA.Library
if (tmp._MyDocVersion != null) DocVersionInfo.Refresh(tmp._MyDocVersion); if (tmp._MyDocVersion != null) DocVersionInfo.Refresh(tmp._MyDocVersion);
if (tmp._MyROFst != null) ROFstInfo.Refresh(tmp._MyROFst); if (tmp._MyROFst != null) ROFstInfo.Refresh(tmp._MyROFst);
} }
ClearRefreshList();
} }
#endregion #endregion
#region Collection #region Collection
@ -437,8 +442,28 @@ namespace VEPROMS.CSLA.Library
{/* require use of factory methods */ {/* require use of factory methods */
AddToCache(this); AddToCache(this);
} }
private bool _Disposed = false;
private static int _CountCreated = 0;
private static int _CountDisposed = 0;
private static int _CountFinalized = 0;
private static int IncrementCountCreated
{ get { return ++_CountCreated; } }
private int _CountWhenCreated = IncrementCountCreated;
public static int CountCreated
{ get { return _CountCreated; } }
public static int CountNotDisposed
{ get { return _CountCreated - _CountDisposed; } }
public static int CountNotFinalized
{ get { return _CountCreated - _CountFinalized; } }
~Association()
{
_CountFinalized++;
}
public void Dispose() public void Dispose()
{ {
if (_Disposed) return;
_CountDisposed++;
_Disposed = true;
RemoveFromDictionaries(); RemoveFromDictionaries();
} }
private void RemoveFromDictionaries() private void RemoveFromDictionaries()

View File

@ -205,8 +205,28 @@ namespace VEPROMS.CSLA.Library
{/* require use of factory methods */ {/* require use of factory methods */
AddToCache(this); AddToCache(this);
} }
private bool _Disposed = false;
private static int _CountCreated = 0;
private static int _CountDisposed = 0;
private static int _CountFinalized = 0;
private static int IncrementCountCreated
{ get { return ++_CountCreated; } }
private int _CountWhenCreated = IncrementCountCreated;
public static int CountCreated
{ get { return _CountCreated; } }
public static int CountNotDisposed
{ get { return _CountCreated - _CountDisposed; } }
public static int CountNotFinalized
{ get { return _CountCreated - _CountFinalized; } }
~AssociationInfo()
{
_CountFinalized++;
}
public void Dispose() public void Dispose()
{ {
if (_Disposed) return;
_CountDisposed++;
_Disposed = true;
RemoveFromCache(this); RemoveFromCache(this);
if (!_CacheByPrimaryKey.ContainsKey(AssociationID.ToString())) return; if (!_CacheByPrimaryKey.ContainsKey(AssociationID.ToString())) return;
List<AssociationInfo> listAssociationInfo = _CacheByPrimaryKey[AssociationID.ToString()]; // Get the list of items List<AssociationInfo> listAssociationInfo = _CacheByPrimaryKey[AssociationID.ToString()]; // Get the list of items

View File

@ -47,8 +47,28 @@ namespace VEPROMS.CSLA.Library
this.OnListChanged(new ListChangedEventArgs(ListChangedType.ItemChanged, i)); this.OnListChanged(new ListChangedEventArgs(ListChangedType.ItemChanged, i));
} }
} }
private bool _Disposed = false;
private static int _CountCreated = 0;
private static int _CountDisposed = 0;
private static int _CountFinalized = 0;
private static int IncrementCountCreated
{ get { return ++_CountCreated; } }
private int _CountWhenCreated = IncrementCountCreated;
public static int CountCreated
{ get { return _CountCreated; } }
public static int CountNotDisposed
{ get { return _CountCreated - _CountDisposed; } }
public static int CountNotFinalized
{ get { return _CountCreated - _CountFinalized; } }
~AssociationInfoList()
{
_CountFinalized++;
}
public void Dispose() public void Dispose()
{ {
if (_Disposed) return;
_CountDisposed++;
_Disposed = true;
foreach (AssociationInfo tmp in this) foreach (AssociationInfo tmp in this)
{ {
tmp.Changed -= new AssociationInfoEvent(tmp_Changed); tmp.Changed -= new AssociationInfoEvent(tmp_Changed);

View File

@ -37,9 +37,13 @@ namespace VEPROMS.CSLA.Library
if (IsDirty) if (IsDirty)
refreshChecks.Add(this); refreshChecks.Add(this);
} }
private void BuildRefreshList() private void ClearRefreshList()
{ {
_RefreshChecks = new List<Check>(); _RefreshChecks = new List<Check>();
}
private void BuildRefreshList()
{
ClearRefreshList();
AddToRefreshList(_RefreshChecks); AddToRefreshList(_RefreshChecks);
} }
private void ProcessRefreshList() private void ProcessRefreshList()
@ -50,6 +54,7 @@ namespace VEPROMS.CSLA.Library
if (tmp._MyRevision != null) RevisionInfo.Refresh(tmp._MyRevision); if (tmp._MyRevision != null) RevisionInfo.Refresh(tmp._MyRevision);
if (tmp._MyStage != null) StageInfo.Refresh(tmp._MyStage); if (tmp._MyStage != null) StageInfo.Refresh(tmp._MyStage);
} }
ClearRefreshList();
} }
#endregion #endregion
#region Collection #region Collection
@ -427,8 +432,28 @@ namespace VEPROMS.CSLA.Library
{/* require use of factory methods */ {/* require use of factory methods */
AddToCache(this); AddToCache(this);
} }
private bool _Disposed = false;
private static int _CountCreated = 0;
private static int _CountDisposed = 0;
private static int _CountFinalized = 0;
private static int IncrementCountCreated
{ get { return ++_CountCreated; } }
private int _CountWhenCreated = IncrementCountCreated;
public static int CountCreated
{ get { return _CountCreated; } }
public static int CountNotDisposed
{ get { return _CountCreated - _CountDisposed; } }
public static int CountNotFinalized
{ get { return _CountCreated - _CountFinalized; } }
~Check()
{
_CountFinalized++;
}
public void Dispose() public void Dispose()
{ {
if (_Disposed) return;
_CountDisposed++;
_Disposed = true;
RemoveFromDictionaries(); RemoveFromDictionaries();
} }
private void RemoveFromDictionaries() private void RemoveFromDictionaries()

View File

@ -204,8 +204,28 @@ namespace VEPROMS.CSLA.Library
{/* require use of factory methods */ {/* require use of factory methods */
AddToCache(this); AddToCache(this);
} }
private bool _Disposed = false;
private static int _CountCreated = 0;
private static int _CountDisposed = 0;
private static int _CountFinalized = 0;
private static int IncrementCountCreated
{ get { return ++_CountCreated; } }
private int _CountWhenCreated = IncrementCountCreated;
public static int CountCreated
{ get { return _CountCreated; } }
public static int CountNotDisposed
{ get { return _CountCreated - _CountDisposed; } }
public static int CountNotFinalized
{ get { return _CountCreated - _CountFinalized; } }
~CheckInfo()
{
_CountFinalized++;
}
public void Dispose() public void Dispose()
{ {
if (_Disposed) return;
_CountDisposed++;
_Disposed = true;
RemoveFromCache(this); RemoveFromCache(this);
if (!_CacheByPrimaryKey.ContainsKey(CheckID.ToString())) return; if (!_CacheByPrimaryKey.ContainsKey(CheckID.ToString())) return;
List<CheckInfo> listCheckInfo = _CacheByPrimaryKey[CheckID.ToString()]; // Get the list of items List<CheckInfo> listCheckInfo = _CacheByPrimaryKey[CheckID.ToString()]; // Get the list of items

View File

@ -47,8 +47,28 @@ namespace VEPROMS.CSLA.Library
this.OnListChanged(new ListChangedEventArgs(ListChangedType.ItemChanged, i)); this.OnListChanged(new ListChangedEventArgs(ListChangedType.ItemChanged, i));
} }
} }
private bool _Disposed = false;
private static int _CountCreated = 0;
private static int _CountDisposed = 0;
private static int _CountFinalized = 0;
private static int IncrementCountCreated
{ get { return ++_CountCreated; } }
private int _CountWhenCreated = IncrementCountCreated;
public static int CountCreated
{ get { return _CountCreated; } }
public static int CountNotDisposed
{ get { return _CountCreated - _CountDisposed; } }
public static int CountNotFinalized
{ get { return _CountCreated - _CountFinalized; } }
~CheckInfoList()
{
_CountFinalized++;
}
public void Dispose() public void Dispose()
{ {
if (_Disposed) return;
_CountDisposed++;
_Disposed = true;
foreach (CheckInfo tmp in this) foreach (CheckInfo tmp in this)
{ {
tmp.Changed -= new CheckInfoEvent(tmp_Changed); tmp.Changed -= new CheckInfoEvent(tmp_Changed);

View File

@ -25,7 +25,7 @@ namespace VEPROMS.CSLA.Library
/// </summary> /// </summary>
[Serializable()] [Serializable()]
[TypeConverter(typeof(ChildFoldersConverter))] [TypeConverter(typeof(ChildFoldersConverter))]
public partial class ChildFolders : BusinessListBase<ChildFolders, Folder>, ICustomTypeDescriptor, IVEHasBrokenRules public partial class ChildFolders : BusinessListBase<ChildFolders, Folder>, ICustomTypeDescriptor, IVEHasBrokenRules , IDisposable
{ {
#region Log4Net #region Log4Net
private static readonly log4net.ILog _MyLog = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); private static readonly log4net.ILog _MyLog = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
@ -189,6 +189,29 @@ namespace VEPROMS.CSLA.Library
MarkAsChild(); MarkAsChild();
Fetch(dr, parent); Fetch(dr, parent);
} }
private bool _Disposed = false;
private static int _CountCreated = 0;
private static int _CountDisposed = 0;
private static int _CountFinalized = 0;
private static int IncrementCountCreated
{ get { return ++_CountCreated; } }
private int _CountWhenCreated = IncrementCountCreated;
public static int CountCreated
{ get { return _CountCreated; } }
public static int CountNotDisposed
{ get { return _CountCreated - _CountDisposed; } }
public static int CountNotFinalized
{ get { return _CountCreated - _CountFinalized; } }
~ChildFolders()
{
_CountFinalized++;
}
public void Dispose()
{
if (_Disposed) return;
_CountDisposed++;
_Disposed = true;
}
#endregion #endregion
#region Data Access Portal #region Data Access Portal
// called to load data from the database // called to load data from the database

View File

@ -25,7 +25,7 @@ namespace VEPROMS.CSLA.Library
/// </summary> /// </summary>
[Serializable()] [Serializable()]
[TypeConverter(typeof(ChildFormatsConverter))] [TypeConverter(typeof(ChildFormatsConverter))]
public partial class ChildFormats : BusinessListBase<ChildFormats, Format>, ICustomTypeDescriptor, IVEHasBrokenRules public partial class ChildFormats : BusinessListBase<ChildFormats, Format>, ICustomTypeDescriptor, IVEHasBrokenRules , IDisposable
{ {
#region Log4Net #region Log4Net
private static readonly log4net.ILog _MyLog = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); private static readonly log4net.ILog _MyLog = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
@ -189,6 +189,29 @@ namespace VEPROMS.CSLA.Library
MarkAsChild(); MarkAsChild();
Fetch(dr, parent); Fetch(dr, parent);
} }
private bool _Disposed = false;
private static int _CountCreated = 0;
private static int _CountDisposed = 0;
private static int _CountFinalized = 0;
private static int IncrementCountCreated
{ get { return ++_CountCreated; } }
private int _CountWhenCreated = IncrementCountCreated;
public static int CountCreated
{ get { return _CountCreated; } }
public static int CountNotDisposed
{ get { return _CountCreated - _CountDisposed; } }
public static int CountNotFinalized
{ get { return _CountCreated - _CountFinalized; } }
~ChildFormats()
{
_CountFinalized++;
}
public void Dispose()
{
if (_Disposed) return;
_CountDisposed++;
_Disposed = true;
}
#endregion #endregion
#region Data Access Portal #region Data Access Portal
// called to load data from the database // called to load data from the database

View File

@ -45,10 +45,14 @@ namespace VEPROMS.CSLA.Library
} }
} }
} }
private void BuildRefreshList() private void ClearRefreshList()
{ {
_RefreshConnections = new List<Connection>(); _RefreshConnections = new List<Connection>();
_RefreshConnectionFolders = new List<ConnectionFolder>(); _RefreshConnectionFolders = new List<ConnectionFolder>();
}
private void BuildRefreshList()
{
ClearRefreshList();
AddToRefreshList(_RefreshConnections, _RefreshConnectionFolders); AddToRefreshList(_RefreshConnections, _RefreshConnectionFolders);
} }
private void ProcessRefreshList() private void ProcessRefreshList()
@ -61,6 +65,7 @@ namespace VEPROMS.CSLA.Library
{ {
FolderInfo.Refresh(tmp); FolderInfo.Refresh(tmp);
} }
ClearRefreshList();
} }
#endregion #endregion
#region Collection #region Collection
@ -510,8 +515,28 @@ namespace VEPROMS.CSLA.Library
{/* require use of factory methods */ {/* require use of factory methods */
AddToCache(this); AddToCache(this);
} }
private bool _Disposed = false;
private static int _CountCreated = 0;
private static int _CountDisposed = 0;
private static int _CountFinalized = 0;
private static int IncrementCountCreated
{ get { return ++_CountCreated; } }
private int _CountWhenCreated = IncrementCountCreated;
public static int CountCreated
{ get { return _CountCreated; } }
public static int CountNotDisposed
{ get { return _CountCreated - _CountDisposed; } }
public static int CountNotFinalized
{ get { return _CountCreated - _CountFinalized; } }
~Connection()
{
_CountFinalized++;
}
public void Dispose() public void Dispose()
{ {
if (_Disposed) return;
_CountDisposed++;
_Disposed = true;
RemoveFromDictionaries(); RemoveFromDictionaries();
} }
private void RemoveFromDictionaries() private void RemoveFromDictionaries()

View File

@ -25,7 +25,7 @@ namespace VEPROMS.CSLA.Library
/// </summary> /// </summary>
[Serializable()] [Serializable()]
[TypeConverter(typeof(ConnectionFolderConverter))] [TypeConverter(typeof(ConnectionFolderConverter))]
public partial class ConnectionFolder : BusinessBase<ConnectionFolder>, IVEHasBrokenRules public partial class ConnectionFolder : BusinessBase<ConnectionFolder>, IVEHasBrokenRules, IDisposable
{ {
#region Log4Net #region Log4Net
private static readonly log4net.ILog _MyLog = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); private static readonly log4net.ILog _MyLog = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
@ -492,6 +492,29 @@ namespace VEPROMS.CSLA.Library
MarkAsChild(); MarkAsChild();
Fetch(dr); Fetch(dr);
} }
private bool _Disposed = false;
private static int _CountCreated = 0;
private static int _CountDisposed = 0;
private static int _CountFinalized = 0;
private static int IncrementCountCreated
{ get { return ++_CountCreated; } }
private int _CountWhenCreated = IncrementCountCreated;
public static int CountCreated
{ get { return _CountCreated; } }
public static int CountNotDisposed
{ get { return _CountCreated - _CountDisposed; } }
public static int CountNotFinalized
{ get { return _CountCreated - _CountFinalized; } }
~ConnectionFolder()
{
_CountFinalized++;
}
public void Dispose()
{
if (_Disposed) return;
_CountDisposed++;
_Disposed = true;
}
#endregion #endregion
#region Data Access Portal #region Data Access Portal
private void Fetch(SafeDataReader dr) private void Fetch(SafeDataReader dr)

View File

@ -25,7 +25,7 @@ namespace VEPROMS.CSLA.Library
/// </summary> /// </summary>
[Serializable()] [Serializable()]
[TypeConverter(typeof(ConnectionFoldersConverter))] [TypeConverter(typeof(ConnectionFoldersConverter))]
public partial class ConnectionFolders : BusinessListBase<ConnectionFolders, ConnectionFolder>, ICustomTypeDescriptor, IVEHasBrokenRules public partial class ConnectionFolders : BusinessListBase<ConnectionFolders, ConnectionFolder>, ICustomTypeDescriptor, IVEHasBrokenRules , IDisposable
{ {
#region Log4Net #region Log4Net
private static readonly log4net.ILog _MyLog = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); private static readonly log4net.ILog _MyLog = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
@ -170,6 +170,29 @@ namespace VEPROMS.CSLA.Library
MarkAsChild(); MarkAsChild();
Fetch(dr); Fetch(dr);
} }
private bool _Disposed = false;
private static int _CountCreated = 0;
private static int _CountDisposed = 0;
private static int _CountFinalized = 0;
private static int IncrementCountCreated
{ get { return ++_CountCreated; } }
private int _CountWhenCreated = IncrementCountCreated;
public static int CountCreated
{ get { return _CountCreated; } }
public static int CountNotDisposed
{ get { return _CountCreated - _CountDisposed; } }
public static int CountNotFinalized
{ get { return _CountCreated - _CountFinalized; } }
~ConnectionFolders()
{
_CountFinalized++;
}
public void Dispose()
{
if (_Disposed) return;
_CountDisposed++;
_Disposed = true;
}
#endregion #endregion
#region Data Access Portal #region Data Access Portal
// called to load data from the database // called to load data from the database

View File

@ -241,8 +241,28 @@ namespace VEPROMS.CSLA.Library
{/* require use of factory methods */ {/* require use of factory methods */
AddToCache(this); AddToCache(this);
} }
private bool _Disposed = false;
private static int _CountCreated = 0;
private static int _CountDisposed = 0;
private static int _CountFinalized = 0;
private static int IncrementCountCreated
{ get { return ++_CountCreated; } }
private int _CountWhenCreated = IncrementCountCreated;
public static int CountCreated
{ get { return _CountCreated; } }
public static int CountNotDisposed
{ get { return _CountCreated - _CountDisposed; } }
public static int CountNotFinalized
{ get { return _CountCreated - _CountFinalized; } }
~ConnectionInfo()
{
_CountFinalized++;
}
public void Dispose() public void Dispose()
{ {
if (_Disposed) return;
_CountDisposed++;
_Disposed = true;
RemoveFromCache(this); RemoveFromCache(this);
if (!_CacheByPrimaryKey.ContainsKey(DBID.ToString())) return; if (!_CacheByPrimaryKey.ContainsKey(DBID.ToString())) return;
List<ConnectionInfo> listConnectionInfo = _CacheByPrimaryKey[DBID.ToString()]; // Get the list of items List<ConnectionInfo> listConnectionInfo = _CacheByPrimaryKey[DBID.ToString()]; // Get the list of items

View File

@ -47,8 +47,28 @@ namespace VEPROMS.CSLA.Library
this.OnListChanged(new ListChangedEventArgs(ListChangedType.ItemChanged, i)); this.OnListChanged(new ListChangedEventArgs(ListChangedType.ItemChanged, i));
} }
} }
private bool _Disposed = false;
private static int _CountCreated = 0;
private static int _CountDisposed = 0;
private static int _CountFinalized = 0;
private static int IncrementCountCreated
{ get { return ++_CountCreated; } }
private int _CountWhenCreated = IncrementCountCreated;
public static int CountCreated
{ get { return _CountCreated; } }
public static int CountNotDisposed
{ get { return _CountCreated - _CountDisposed; } }
public static int CountNotFinalized
{ get { return _CountCreated - _CountFinalized; } }
~ConnectionInfoList()
{
_CountFinalized++;
}
public void Dispose() public void Dispose()
{ {
if (_Disposed) return;
_CountDisposed++;
_Disposed = true;
foreach (ConnectionInfo tmp in this) foreach (ConnectionInfo tmp in this)
{ {
tmp.Changed -= new ConnectionInfoEvent(tmp_Changed); tmp.Changed -= new ConnectionInfoEvent(tmp_Changed);

View File

@ -77,7 +77,7 @@ namespace VEPROMS.CSLA.Library
} }
} }
} }
private void BuildRefreshList() private void ClearRefreshList()
{ {
_RefreshContents = new List<Content>(); _RefreshContents = new List<Content>();
_RefreshContentDetails = new List<ContentDetail>(); _RefreshContentDetails = new List<ContentDetail>();
@ -85,6 +85,10 @@ namespace VEPROMS.CSLA.Library
_RefreshContentParts = new List<ContentPart>(); _RefreshContentParts = new List<ContentPart>();
_RefreshContentRoUsages = new List<ContentRoUsage>(); _RefreshContentRoUsages = new List<ContentRoUsage>();
_RefreshContentTransitions = new List<ContentTransition>(); _RefreshContentTransitions = new List<ContentTransition>();
}
private void BuildRefreshList()
{
ClearRefreshList();
AddToRefreshList(_RefreshContents, _RefreshContentDetails, _RefreshContentItems, _RefreshContentParts, _RefreshContentRoUsages, _RefreshContentTransitions); AddToRefreshList(_RefreshContents, _RefreshContentDetails, _RefreshContentItems, _RefreshContentParts, _RefreshContentRoUsages, _RefreshContentTransitions);
} }
private void ProcessRefreshList() private void ProcessRefreshList()
@ -114,6 +118,7 @@ namespace VEPROMS.CSLA.Library
{ {
TransitionInfo.Refresh(tmp); TransitionInfo.Refresh(tmp);
} }
ClearRefreshList();
} }
#endregion #endregion
#region Collection #region Collection
@ -403,6 +408,12 @@ namespace VEPROMS.CSLA.Library
return _MyEntry; return _MyEntry;
} }
} }
[TypeConverter(typeof(EntryConverter))]
public Entry LocalEntry
{
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get { return _MyEntry; }
}
private int _ContentGridCount = 0; private int _ContentGridCount = 0;
/// <summary> /// <summary>
/// Count of ContentGrids for this Content /// Count of ContentGrids for this Content
@ -846,14 +857,32 @@ namespace VEPROMS.CSLA.Library
AddToCache(this); AddToCache(this);
} }
private bool _Disposed = false; private bool _Disposed = false;
public bool Disposed public bool Disposed
{ {
get { return _Disposed; } get { return _Disposed; }
set { _Disposed = value; } set { _Disposed = value; }
} }
private static int _CountCreated = 0;
private static int _CountDisposed = 0;
private static int _CountFinalized = 0;
private static int IncrementCountCreated
{ get { return ++_CountCreated; } }
private int _CountWhenCreated = IncrementCountCreated;
public static int CountCreated
{ get { return _CountCreated; } }
public static int CountNotDisposed
{ get { return _CountCreated - _CountDisposed; } }
public static int CountNotFinalized
{ get { return _CountCreated - _CountFinalized; } }
~Content()
{
_CountFinalized++;
}
public void Dispose() public void Dispose()
{ {
if (_Disposed) return;
_CountDisposed++;
_Disposed = true;
if (_MyGrid != null) if (_MyGrid != null)
{ {
_MyGrid.Dispose(); _MyGrid.Dispose();

View File

@ -37,9 +37,13 @@ namespace VEPROMS.CSLA.Library
if (IsDirty) if (IsDirty)
refreshContentAudits.Add(this); refreshContentAudits.Add(this);
} }
private void BuildRefreshList() private void ClearRefreshList()
{ {
_RefreshContentAudits = new List<ContentAudit>(); _RefreshContentAudits = new List<ContentAudit>();
}
private void BuildRefreshList()
{
ClearRefreshList();
AddToRefreshList(_RefreshContentAudits); AddToRefreshList(_RefreshContentAudits);
} }
private void ProcessRefreshList() private void ProcessRefreshList()
@ -48,6 +52,7 @@ namespace VEPROMS.CSLA.Library
{ {
ContentAuditInfo.Refresh(tmp); ContentAuditInfo.Refresh(tmp);
} }
ClearRefreshList();
} }
#endregion #endregion
#region Collection #region Collection
@ -461,8 +466,28 @@ namespace VEPROMS.CSLA.Library
{/* require use of factory methods */ {/* require use of factory methods */
AddToCache(this); AddToCache(this);
} }
private bool _Disposed = false;
private static int _CountCreated = 0;
private static int _CountDisposed = 0;
private static int _CountFinalized = 0;
private static int IncrementCountCreated
{ get { return ++_CountCreated; } }
private int _CountWhenCreated = IncrementCountCreated;
public static int CountCreated
{ get { return _CountCreated; } }
public static int CountNotDisposed
{ get { return _CountCreated - _CountDisposed; } }
public static int CountNotFinalized
{ get { return _CountCreated - _CountFinalized; } }
~ContentAudit()
{
_CountFinalized++;
}
public void Dispose() public void Dispose()
{ {
if (_Disposed) return;
_CountDisposed++;
_Disposed = true;
RemoveFromDictionaries(); RemoveFromDictionaries();
} }
private void RemoveFromDictionaries() private void RemoveFromDictionaries()

View File

@ -220,8 +220,28 @@ namespace VEPROMS.CSLA.Library
{/* require use of factory methods */ {/* require use of factory methods */
AddToCache(this); AddToCache(this);
} }
private bool _Disposed = false;
private static int _CountCreated = 0;
private static int _CountDisposed = 0;
private static int _CountFinalized = 0;
private static int IncrementCountCreated
{ get { return ++_CountCreated; } }
private int _CountWhenCreated = IncrementCountCreated;
public static int CountCreated
{ get { return _CountCreated; } }
public static int CountNotDisposed
{ get { return _CountCreated - _CountDisposed; } }
public static int CountNotFinalized
{ get { return _CountCreated - _CountFinalized; } }
~ContentAuditInfo()
{
_CountFinalized++;
}
public void Dispose() public void Dispose()
{ {
if (_Disposed) return;
_CountDisposed++;
_Disposed = true;
RemoveFromCache(this); RemoveFromCache(this);
if (!_CacheByPrimaryKey.ContainsKey(AuditID.ToString())) return; if (!_CacheByPrimaryKey.ContainsKey(AuditID.ToString())) return;
List<ContentAuditInfo> listContentAuditInfo = _CacheByPrimaryKey[AuditID.ToString()]; // Get the list of items List<ContentAuditInfo> listContentAuditInfo = _CacheByPrimaryKey[AuditID.ToString()]; // Get the list of items

View File

@ -47,8 +47,28 @@ namespace VEPROMS.CSLA.Library
this.OnListChanged(new ListChangedEventArgs(ListChangedType.ItemChanged, i)); this.OnListChanged(new ListChangedEventArgs(ListChangedType.ItemChanged, i));
} }
} }
private bool _Disposed = false;
private static int _CountCreated = 0;
private static int _CountDisposed = 0;
private static int _CountFinalized = 0;
private static int IncrementCountCreated
{ get { return ++_CountCreated; } }
private int _CountWhenCreated = IncrementCountCreated;
public static int CountCreated
{ get { return _CountCreated; } }
public static int CountNotDisposed
{ get { return _CountCreated - _CountDisposed; } }
public static int CountNotFinalized
{ get { return _CountCreated - _CountFinalized; } }
~ContentAuditInfoList()
{
_CountFinalized++;
}
public void Dispose() public void Dispose()
{ {
if (_Disposed) return;
_CountDisposed++;
_Disposed = true;
foreach (ContentAuditInfo tmp in this) foreach (ContentAuditInfo tmp in this)
{ {
tmp.Changed -= new ContentAuditInfoEvent(tmp_Changed); tmp.Changed -= new ContentAuditInfoEvent(tmp_Changed);

View File

@ -25,7 +25,7 @@ namespace VEPROMS.CSLA.Library
/// </summary> /// </summary>
[Serializable()] [Serializable()]
[TypeConverter(typeof(ContentDetailConverter))] [TypeConverter(typeof(ContentDetailConverter))]
public partial class ContentDetail : BusinessBase<ContentDetail>, IVEHasBrokenRules public partial class ContentDetail : BusinessBase<ContentDetail>, IVEHasBrokenRules, IDisposable
{ {
#region Log4Net #region Log4Net
private static readonly log4net.ILog _MyLog = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); private static readonly log4net.ILog _MyLog = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
@ -342,6 +342,29 @@ namespace VEPROMS.CSLA.Library
MarkAsChild(); MarkAsChild();
Fetch(dr); Fetch(dr);
} }
private bool _Disposed = false;
private static int _CountCreated = 0;
private static int _CountDisposed = 0;
private static int _CountFinalized = 0;
private static int IncrementCountCreated
{ get { return ++_CountCreated; } }
private int _CountWhenCreated = IncrementCountCreated;
public static int CountCreated
{ get { return _CountCreated; } }
public static int CountNotDisposed
{ get { return _CountCreated - _CountDisposed; } }
public static int CountNotFinalized
{ get { return _CountCreated - _CountFinalized; } }
~ContentDetail()
{
_CountFinalized++;
}
public void Dispose()
{
if (_Disposed) return;
_CountDisposed++;
_Disposed = true;
}
#endregion #endregion
#region Data Access Portal #region Data Access Portal
private void Fetch(SafeDataReader dr) private void Fetch(SafeDataReader dr)

View File

@ -25,7 +25,7 @@ namespace VEPROMS.CSLA.Library
/// </summary> /// </summary>
[Serializable()] [Serializable()]
[TypeConverter(typeof(ContentDetailsConverter))] [TypeConverter(typeof(ContentDetailsConverter))]
public partial class ContentDetails : BusinessListBase<ContentDetails, ContentDetail>, ICustomTypeDescriptor, IVEHasBrokenRules public partial class ContentDetails : BusinessListBase<ContentDetails, ContentDetail>, ICustomTypeDescriptor, IVEHasBrokenRules , IDisposable
{ {
#region Log4Net #region Log4Net
private static readonly log4net.ILog _MyLog = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); private static readonly log4net.ILog _MyLog = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
@ -170,6 +170,29 @@ namespace VEPROMS.CSLA.Library
MarkAsChild(); MarkAsChild();
Fetch(dr); Fetch(dr);
} }
private bool _Disposed = false;
private static int _CountCreated = 0;
private static int _CountDisposed = 0;
private static int _CountFinalized = 0;
private static int IncrementCountCreated
{ get { return ++_CountCreated; } }
private int _CountWhenCreated = IncrementCountCreated;
public static int CountCreated
{ get { return _CountCreated; } }
public static int CountNotDisposed
{ get { return _CountCreated - _CountDisposed; } }
public static int CountNotFinalized
{ get { return _CountCreated - _CountFinalized; } }
~ContentDetails()
{
_CountFinalized++;
}
public void Dispose()
{
if (_Disposed) return;
_CountDisposed++;
_Disposed = true;
}
#endregion #endregion
#region Data Access Portal #region Data Access Portal
// called to load data from the database // called to load data from the database

View File

@ -545,8 +545,28 @@ namespace VEPROMS.CSLA.Library
{/* require use of factory methods */ {/* require use of factory methods */
AddToCache(this); AddToCache(this);
} }
private bool _Disposed = false;
private static int _CountCreated = 0;
private static int _CountDisposed = 0;
private static int _CountFinalized = 0;
private static int IncrementCountCreated
{ get { return ++_CountCreated; } }
private int _CountWhenCreated = IncrementCountCreated;
public static int CountCreated
{ get { return _CountCreated; } }
public static int CountNotDisposed
{ get { return _CountCreated - _CountDisposed; } }
public static int CountNotFinalized
{ get { return _CountCreated - _CountFinalized; } }
~ContentInfo()
{
_CountFinalized++;
}
public void Dispose() public void Dispose()
{ {
if (_Disposed) return;
_CountDisposed++;
_Disposed = true;
RemoveFromCache(this); RemoveFromCache(this);
if (!_CacheByPrimaryKey.ContainsKey(ContentID.ToString())) return; if (!_CacheByPrimaryKey.ContainsKey(ContentID.ToString())) return;
List<ContentInfo> listContentInfo = _CacheByPrimaryKey[ContentID.ToString()]; // Get the list of items List<ContentInfo> listContentInfo = _CacheByPrimaryKey[ContentID.ToString()]; // Get the list of items
@ -567,7 +587,7 @@ namespace VEPROMS.CSLA.Library
{ {
tmpInfo.RefreshFields(tmp); tmpInfo.RefreshFields(tmp);
// TODO: This needs to be handled in Generatedd Code. // TODO: This needs to be handled in Generatedd Code.
if (tmp.MyEntry != null && tmpInfo.MyEntry != null && tmp.MyEntry.MyDocument.DocID != tmpInfo.MyEntry.MyDocument.DocID) if (tmp.LocalEntry != null && tmpInfo.MyEntry != null && tmp.MyEntry.MyDocument.DocID != tmpInfo.MyEntry.MyDocument.DocID)
EntryInfo.Refresh(tmp.MyEntry); EntryInfo.Refresh(tmp.MyEntry);
} }
} }

View File

@ -47,8 +47,28 @@ namespace VEPROMS.CSLA.Library
this.OnListChanged(new ListChangedEventArgs(ListChangedType.ItemChanged, i)); this.OnListChanged(new ListChangedEventArgs(ListChangedType.ItemChanged, i));
} }
} }
private bool _Disposed = false;
private static int _CountCreated = 0;
private static int _CountDisposed = 0;
private static int _CountFinalized = 0;
private static int IncrementCountCreated
{ get { return ++_CountCreated; } }
private int _CountWhenCreated = IncrementCountCreated;
public static int CountCreated
{ get { return _CountCreated; } }
public static int CountNotDisposed
{ get { return _CountCreated - _CountDisposed; } }
public static int CountNotFinalized
{ get { return _CountCreated - _CountFinalized; } }
~ContentInfoList()
{
_CountFinalized++;
}
public void Dispose() public void Dispose()
{ {
if (_Disposed) return;
_CountDisposed++;
_Disposed = true;
foreach (ContentInfo tmp in this) foreach (ContentInfo tmp in this)
{ {
tmp.Changed -= new ContentInfoEvent(tmp_Changed); tmp.Changed -= new ContentInfoEvent(tmp_Changed);

View File

@ -25,7 +25,7 @@ namespace VEPROMS.CSLA.Library
/// </summary> /// </summary>
[Serializable()] [Serializable()]
[TypeConverter(typeof(ContentItemConverter))] [TypeConverter(typeof(ContentItemConverter))]
public partial class ContentItem : BusinessBase<ContentItem>, IVEHasBrokenRules public partial class ContentItem : BusinessBase<ContentItem>, IVEHasBrokenRules, IDisposable
{ {
#region Log4Net #region Log4Net
private static readonly log4net.ILog _MyLog = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); private static readonly log4net.ILog _MyLog = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
@ -291,6 +291,29 @@ namespace VEPROMS.CSLA.Library
MarkAsChild(); MarkAsChild();
Fetch(dr); Fetch(dr);
} }
private bool _Disposed = false;
private static int _CountCreated = 0;
private static int _CountDisposed = 0;
private static int _CountFinalized = 0;
private static int IncrementCountCreated
{ get { return ++_CountCreated; } }
private int _CountWhenCreated = IncrementCountCreated;
public static int CountCreated
{ get { return _CountCreated; } }
public static int CountNotDisposed
{ get { return _CountCreated - _CountDisposed; } }
public static int CountNotFinalized
{ get { return _CountCreated - _CountFinalized; } }
~ContentItem()
{
_CountFinalized++;
}
public void Dispose()
{
if (_Disposed) return;
_CountDisposed++;
_Disposed = true;
}
#endregion #endregion
#region Data Access Portal #region Data Access Portal
private void Fetch(SafeDataReader dr) private void Fetch(SafeDataReader dr)

View File

@ -25,7 +25,7 @@ namespace VEPROMS.CSLA.Library
/// </summary> /// </summary>
[Serializable()] [Serializable()]
[TypeConverter(typeof(ContentItemsConverter))] [TypeConverter(typeof(ContentItemsConverter))]
public partial class ContentItems : BusinessListBase<ContentItems, ContentItem>, ICustomTypeDescriptor, IVEHasBrokenRules public partial class ContentItems : BusinessListBase<ContentItems, ContentItem>, ICustomTypeDescriptor, IVEHasBrokenRules , IDisposable
{ {
#region Log4Net #region Log4Net
private static readonly log4net.ILog _MyLog = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); private static readonly log4net.ILog _MyLog = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
@ -170,6 +170,29 @@ namespace VEPROMS.CSLA.Library
MarkAsChild(); MarkAsChild();
Fetch(dr); Fetch(dr);
} }
private bool _Disposed = false;
private static int _CountCreated = 0;
private static int _CountDisposed = 0;
private static int _CountFinalized = 0;
private static int IncrementCountCreated
{ get { return ++_CountCreated; } }
private int _CountWhenCreated = IncrementCountCreated;
public static int CountCreated
{ get { return _CountCreated; } }
public static int CountNotDisposed
{ get { return _CountCreated - _CountDisposed; } }
public static int CountNotFinalized
{ get { return _CountCreated - _CountFinalized; } }
~ContentItems()
{
_CountFinalized++;
}
public void Dispose()
{
if (_Disposed) return;
_CountDisposed++;
_Disposed = true;
}
#endregion #endregion
#region Data Access Portal #region Data Access Portal
// called to load data from the database // called to load data from the database

View File

@ -25,7 +25,7 @@ namespace VEPROMS.CSLA.Library
/// </summary> /// </summary>
[Serializable()] [Serializable()]
[TypeConverter(typeof(ContentPartConverter))] [TypeConverter(typeof(ContentPartConverter))]
public partial class ContentPart : BusinessBase<ContentPart>, IVEHasBrokenRules public partial class ContentPart : BusinessBase<ContentPart>, IVEHasBrokenRules, IDisposable
{ {
#region Log4Net #region Log4Net
private static readonly log4net.ILog _MyLog = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); private static readonly log4net.ILog _MyLog = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
@ -349,6 +349,34 @@ namespace VEPROMS.CSLA.Library
MarkAsChild(); MarkAsChild();
Fetch(dr); Fetch(dr);
} }
private bool _Disposed = false;
private static int _CountCreated = 0;
private static int _CountDisposed = 0;
private static int _CountFinalized = 0;
private static int IncrementCountCreated
{ get { return ++_CountCreated; } }
private int _CountWhenCreated = IncrementCountCreated;
public static int CountCreated
{ get { return _CountCreated; } }
public static int CountNotDisposed
{ get { return _CountCreated - _CountDisposed; } }
public static int CountNotFinalized
{ get { return _CountCreated - _CountFinalized; } }
~ContentPart()
{
_CountFinalized++;
}
public void Dispose()
{
if (_Disposed) return;
_CountDisposed++;
_Disposed = true;
if (_MyItem != null)
{
_MyItem.Dispose();
_MyItem = null;
}
}
#endregion #endregion
#region Data Access Portal #region Data Access Portal
private void Fetch(SafeDataReader dr) private void Fetch(SafeDataReader dr)

View File

@ -25,7 +25,7 @@ namespace VEPROMS.CSLA.Library
/// </summary> /// </summary>
[Serializable()] [Serializable()]
[TypeConverter(typeof(ContentPartsConverter))] [TypeConverter(typeof(ContentPartsConverter))]
public partial class ContentParts : BusinessListBase<ContentParts, ContentPart>, ICustomTypeDescriptor, IVEHasBrokenRules public partial class ContentParts : BusinessListBase<ContentParts, ContentPart>, ICustomTypeDescriptor, IVEHasBrokenRules , IDisposable
{ {
#region Log4Net #region Log4Net
private static readonly log4net.ILog _MyLog = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); private static readonly log4net.ILog _MyLog = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
@ -175,6 +175,29 @@ namespace VEPROMS.CSLA.Library
MarkAsChild(); MarkAsChild();
Fetch(dr); Fetch(dr);
} }
private bool _Disposed = false;
private static int _CountCreated = 0;
private static int _CountDisposed = 0;
private static int _CountFinalized = 0;
private static int IncrementCountCreated
{ get { return ++_CountCreated; } }
private int _CountWhenCreated = IncrementCountCreated;
public static int CountCreated
{ get { return _CountCreated; } }
public static int CountNotDisposed
{ get { return _CountCreated - _CountDisposed; } }
public static int CountNotFinalized
{ get { return _CountCreated - _CountFinalized; } }
~ContentParts()
{
_CountFinalized++;
}
public void Dispose()
{
if (_Disposed) return;
_CountDisposed++;
_Disposed = true;
}
#endregion #endregion
#region Data Access Portal #region Data Access Portal
// called to load data from the database // called to load data from the database

View File

@ -25,7 +25,7 @@ namespace VEPROMS.CSLA.Library
/// </summary> /// </summary>
[Serializable()] [Serializable()]
[TypeConverter(typeof(ContentRoUsageConverter))] [TypeConverter(typeof(ContentRoUsageConverter))]
public partial class ContentRoUsage : BusinessBase<ContentRoUsage>, IVEHasBrokenRules public partial class ContentRoUsage : BusinessBase<ContentRoUsage>, IVEHasBrokenRules, IDisposable
{ {
#region Log4Net #region Log4Net
private static readonly log4net.ILog _MyLog = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); private static readonly log4net.ILog _MyLog = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
@ -446,6 +446,29 @@ namespace VEPROMS.CSLA.Library
MarkAsChild(); MarkAsChild();
Fetch(dr); Fetch(dr);
} }
private bool _Disposed = false;
private static int _CountCreated = 0;
private static int _CountDisposed = 0;
private static int _CountFinalized = 0;
private static int IncrementCountCreated
{ get { return ++_CountCreated; } }
private int _CountWhenCreated = IncrementCountCreated;
public static int CountCreated
{ get { return _CountCreated; } }
public static int CountNotDisposed
{ get { return _CountCreated - _CountDisposed; } }
public static int CountNotFinalized
{ get { return _CountCreated - _CountFinalized; } }
~ContentRoUsage()
{
_CountFinalized++;
}
public void Dispose()
{
if (_Disposed) return;
_CountDisposed++;
_Disposed = true;
}
#endregion #endregion
#region Data Access Portal #region Data Access Portal
private void Fetch(SafeDataReader dr) private void Fetch(SafeDataReader dr)

View File

@ -25,7 +25,7 @@ namespace VEPROMS.CSLA.Library
/// </summary> /// </summary>
[Serializable()] [Serializable()]
[TypeConverter(typeof(ContentRoUsagesConverter))] [TypeConverter(typeof(ContentRoUsagesConverter))]
public partial class ContentRoUsages : BusinessListBase<ContentRoUsages, ContentRoUsage>, ICustomTypeDescriptor, IVEHasBrokenRules public partial class ContentRoUsages : BusinessListBase<ContentRoUsages, ContentRoUsage>, ICustomTypeDescriptor, IVEHasBrokenRules , IDisposable
{ {
#region Log4Net #region Log4Net
private static readonly log4net.ILog _MyLog = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); private static readonly log4net.ILog _MyLog = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
@ -170,6 +170,29 @@ namespace VEPROMS.CSLA.Library
MarkAsChild(); MarkAsChild();
Fetch(dr); Fetch(dr);
} }
private bool _Disposed = false;
private static int _CountCreated = 0;
private static int _CountDisposed = 0;
private static int _CountFinalized = 0;
private static int IncrementCountCreated
{ get { return ++_CountCreated; } }
private int _CountWhenCreated = IncrementCountCreated;
public static int CountCreated
{ get { return _CountCreated; } }
public static int CountNotDisposed
{ get { return _CountCreated - _CountDisposed; } }
public static int CountNotFinalized
{ get { return _CountCreated - _CountFinalized; } }
~ContentRoUsages()
{
_CountFinalized++;
}
public void Dispose()
{
if (_Disposed) return;
_CountDisposed++;
_Disposed = true;
}
#endregion #endregion
#region Data Access Portal #region Data Access Portal
// called to load data from the database // called to load data from the database

View File

@ -25,7 +25,7 @@ namespace VEPROMS.CSLA.Library
/// </summary> /// </summary>
[Serializable()] [Serializable()]
[TypeConverter(typeof(ContentTransitionConverter))] [TypeConverter(typeof(ContentTransitionConverter))]
public partial class ContentTransition : BusinessBase<ContentTransition>, IVEHasBrokenRules public partial class ContentTransition : BusinessBase<ContentTransition>, IVEHasBrokenRules, IDisposable
{ {
#region Log4Net #region Log4Net
private static readonly log4net.ILog _MyLog = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); private static readonly log4net.ILog _MyLog = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
@ -529,6 +529,29 @@ namespace VEPROMS.CSLA.Library
MarkAsChild(); MarkAsChild();
Fetch(dr); Fetch(dr);
} }
private bool _Disposed = false;
private static int _CountCreated = 0;
private static int _CountDisposed = 0;
private static int _CountFinalized = 0;
private static int IncrementCountCreated
{ get { return ++_CountCreated; } }
private int _CountWhenCreated = IncrementCountCreated;
public static int CountCreated
{ get { return _CountCreated; } }
public static int CountNotDisposed
{ get { return _CountCreated - _CountDisposed; } }
public static int CountNotFinalized
{ get { return _CountCreated - _CountFinalized; } }
~ContentTransition()
{
_CountFinalized++;
}
public void Dispose()
{
if (_Disposed) return;
_CountDisposed++;
_Disposed = true;
}
#endregion #endregion
#region Data Access Portal #region Data Access Portal
private void Fetch(SafeDataReader dr) private void Fetch(SafeDataReader dr)

View File

@ -25,7 +25,7 @@ namespace VEPROMS.CSLA.Library
/// </summary> /// </summary>
[Serializable()] [Serializable()]
[TypeConverter(typeof(ContentTransitionsConverter))] [TypeConverter(typeof(ContentTransitionsConverter))]
public partial class ContentTransitions : BusinessListBase<ContentTransitions, ContentTransition>, ICustomTypeDescriptor, IVEHasBrokenRules public partial class ContentTransitions : BusinessListBase<ContentTransitions, ContentTransition>, ICustomTypeDescriptor, IVEHasBrokenRules , IDisposable
{ {
#region Log4Net #region Log4Net
private static readonly log4net.ILog _MyLog = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); private static readonly log4net.ILog _MyLog = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
@ -170,6 +170,29 @@ namespace VEPROMS.CSLA.Library
MarkAsChild(); MarkAsChild();
Fetch(dr); Fetch(dr);
} }
private bool _Disposed = false;
private static int _CountCreated = 0;
private static int _CountDisposed = 0;
private static int _CountFinalized = 0;
private static int IncrementCountCreated
{ get { return ++_CountCreated; } }
private int _CountWhenCreated = IncrementCountCreated;
public static int CountCreated
{ get { return _CountCreated; } }
public static int CountNotDisposed
{ get { return _CountCreated - _CountDisposed; } }
public static int CountNotFinalized
{ get { return _CountCreated - _CountFinalized; } }
~ContentTransitions()
{
_CountFinalized++;
}
public void Dispose()
{
if (_Disposed) return;
_CountDisposed++;
_Disposed = true;
}
#endregion #endregion
#region Data Access Portal #region Data Access Portal
// called to load data from the database // called to load data from the database

View File

@ -37,9 +37,13 @@ namespace VEPROMS.CSLA.Library
if (IsDirty) if (IsDirty)
refreshDROUsages.Add(this); refreshDROUsages.Add(this);
} }
private void BuildRefreshList() private void ClearRefreshList()
{ {
_RefreshDROUsages = new List<DROUsage>(); _RefreshDROUsages = new List<DROUsage>();
}
private void BuildRefreshList()
{
ClearRefreshList();
AddToRefreshList(_RefreshDROUsages); AddToRefreshList(_RefreshDROUsages);
} }
private void ProcessRefreshList() private void ProcessRefreshList()
@ -50,6 +54,7 @@ namespace VEPROMS.CSLA.Library
if (tmp._MyDocument != null) DocumentInfo.Refresh(tmp._MyDocument); if (tmp._MyDocument != null) DocumentInfo.Refresh(tmp._MyDocument);
if (tmp._MyRODb != null) RODbInfo.Refresh(tmp._MyRODb); if (tmp._MyRODb != null) RODbInfo.Refresh(tmp._MyRODb);
} }
ClearRefreshList();
} }
#endregion #endregion
#region Collection #region Collection
@ -455,8 +460,28 @@ namespace VEPROMS.CSLA.Library
{/* require use of factory methods */ {/* require use of factory methods */
AddToCache(this); AddToCache(this);
} }
private bool _Disposed = false;
private static int _CountCreated = 0;
private static int _CountDisposed = 0;
private static int _CountFinalized = 0;
private static int IncrementCountCreated
{ get { return ++_CountCreated; } }
private int _CountWhenCreated = IncrementCountCreated;
public static int CountCreated
{ get { return _CountCreated; } }
public static int CountNotDisposed
{ get { return _CountCreated - _CountDisposed; } }
public static int CountNotFinalized
{ get { return _CountCreated - _CountFinalized; } }
~DROUsage()
{
_CountFinalized++;
}
public void Dispose() public void Dispose()
{ {
if (_Disposed) return;
_CountDisposed++;
_Disposed = true;
RemoveFromDictionaries(); RemoveFromDictionaries();
} }
private void RemoveFromDictionaries() private void RemoveFromDictionaries()

View File

@ -214,8 +214,28 @@ namespace VEPROMS.CSLA.Library
{/* require use of factory methods */ {/* require use of factory methods */
AddToCache(this); AddToCache(this);
} }
private bool _Disposed = false;
private static int _CountCreated = 0;
private static int _CountDisposed = 0;
private static int _CountFinalized = 0;
private static int IncrementCountCreated
{ get { return ++_CountCreated; } }
private int _CountWhenCreated = IncrementCountCreated;
public static int CountCreated
{ get { return _CountCreated; } }
public static int CountNotDisposed
{ get { return _CountCreated - _CountDisposed; } }
public static int CountNotFinalized
{ get { return _CountCreated - _CountFinalized; } }
~DROUsageInfo()
{
_CountFinalized++;
}
public void Dispose() public void Dispose()
{ {
if (_Disposed) return;
_CountDisposed++;
_Disposed = true;
RemoveFromCache(this); RemoveFromCache(this);
if (!_CacheByPrimaryKey.ContainsKey(DROUsageID.ToString())) return; if (!_CacheByPrimaryKey.ContainsKey(DROUsageID.ToString())) return;
List<DROUsageInfo> listDROUsageInfo = _CacheByPrimaryKey[DROUsageID.ToString()]; // Get the list of items List<DROUsageInfo> listDROUsageInfo = _CacheByPrimaryKey[DROUsageID.ToString()]; // Get the list of items

View File

@ -47,8 +47,28 @@ namespace VEPROMS.CSLA.Library
this.OnListChanged(new ListChangedEventArgs(ListChangedType.ItemChanged, i)); this.OnListChanged(new ListChangedEventArgs(ListChangedType.ItemChanged, i));
} }
} }
private bool _Disposed = false;
private static int _CountCreated = 0;
private static int _CountDisposed = 0;
private static int _CountFinalized = 0;
private static int IncrementCountCreated
{ get { return ++_CountCreated; } }
private int _CountWhenCreated = IncrementCountCreated;
public static int CountCreated
{ get { return _CountCreated; } }
public static int CountNotDisposed
{ get { return _CountCreated - _CountDisposed; } }
public static int CountNotFinalized
{ get { return _CountCreated - _CountFinalized; } }
~DROUsageInfoList()
{
_CountFinalized++;
}
public void Dispose() public void Dispose()
{ {
if (_Disposed) return;
_CountDisposed++;
_Disposed = true;
foreach (DROUsageInfo tmp in this) foreach (DROUsageInfo tmp in this)
{ {
tmp.Changed -= new DROUsageInfoEvent(tmp_Changed); tmp.Changed -= new DROUsageInfoEvent(tmp_Changed);

View File

@ -37,9 +37,13 @@ namespace VEPROMS.CSLA.Library
if (IsDirty) if (IsDirty)
refreshDetails.Add(this); refreshDetails.Add(this);
} }
private void BuildRefreshList() private void ClearRefreshList()
{ {
_RefreshDetails = new List<Detail>(); _RefreshDetails = new List<Detail>();
}
private void BuildRefreshList()
{
ClearRefreshList();
AddToRefreshList(_RefreshDetails); AddToRefreshList(_RefreshDetails);
} }
private void ProcessRefreshList() private void ProcessRefreshList()
@ -49,6 +53,7 @@ namespace VEPROMS.CSLA.Library
DetailInfo.Refresh(tmp); DetailInfo.Refresh(tmp);
if (tmp._MyContent != null) ContentInfo.Refresh(tmp._MyContent); if (tmp._MyContent != null) ContentInfo.Refresh(tmp._MyContent);
} }
ClearRefreshList();
} }
#endregion #endregion
#region Collection #region Collection
@ -430,8 +435,28 @@ namespace VEPROMS.CSLA.Library
{/* require use of factory methods */ {/* require use of factory methods */
AddToCache(this); AddToCache(this);
} }
private bool _Disposed = false;
private static int _CountCreated = 0;
private static int _CountDisposed = 0;
private static int _CountFinalized = 0;
private static int IncrementCountCreated
{ get { return ++_CountCreated; } }
private int _CountWhenCreated = IncrementCountCreated;
public static int CountCreated
{ get { return _CountCreated; } }
public static int CountNotDisposed
{ get { return _CountCreated - _CountDisposed; } }
public static int CountNotFinalized
{ get { return _CountCreated - _CountFinalized; } }
~Detail()
{
_CountFinalized++;
}
public void Dispose() public void Dispose()
{ {
if (_Disposed) return;
_CountDisposed++;
_Disposed = true;
RemoveFromDictionaries(); RemoveFromDictionaries();
} }
private void RemoveFromDictionaries() private void RemoveFromDictionaries()

View File

@ -202,8 +202,28 @@ namespace VEPROMS.CSLA.Library
{/* require use of factory methods */ {/* require use of factory methods */
AddToCache(this); AddToCache(this);
} }
private bool _Disposed = false;
private static int _CountCreated = 0;
private static int _CountDisposed = 0;
private static int _CountFinalized = 0;
private static int IncrementCountCreated
{ get { return ++_CountCreated; } }
private int _CountWhenCreated = IncrementCountCreated;
public static int CountCreated
{ get { return _CountCreated; } }
public static int CountNotDisposed
{ get { return _CountCreated - _CountDisposed; } }
public static int CountNotFinalized
{ get { return _CountCreated - _CountFinalized; } }
~DetailInfo()
{
_CountFinalized++;
}
public void Dispose() public void Dispose()
{ {
if (_Disposed) return;
_CountDisposed++;
_Disposed = true;
RemoveFromCache(this); RemoveFromCache(this);
if (!_CacheByPrimaryKey.ContainsKey(DetailID.ToString())) return; if (!_CacheByPrimaryKey.ContainsKey(DetailID.ToString())) return;
List<DetailInfo> listDetailInfo = _CacheByPrimaryKey[DetailID.ToString()]; // Get the list of items List<DetailInfo> listDetailInfo = _CacheByPrimaryKey[DetailID.ToString()]; // Get the list of items

View File

@ -47,8 +47,28 @@ namespace VEPROMS.CSLA.Library
this.OnListChanged(new ListChangedEventArgs(ListChangedType.ItemChanged, i)); this.OnListChanged(new ListChangedEventArgs(ListChangedType.ItemChanged, i));
} }
} }
private bool _Disposed = false;
private static int _CountCreated = 0;
private static int _CountDisposed = 0;
private static int _CountFinalized = 0;
private static int IncrementCountCreated
{ get { return ++_CountCreated; } }
private int _CountWhenCreated = IncrementCountCreated;
public static int CountCreated
{ get { return _CountCreated; } }
public static int CountNotDisposed
{ get { return _CountCreated - _CountDisposed; } }
public static int CountNotFinalized
{ get { return _CountCreated - _CountFinalized; } }
~DetailInfoList()
{
_CountFinalized++;
}
public void Dispose() public void Dispose()
{ {
if (_Disposed) return;
_CountDisposed++;
_Disposed = true;
foreach (DetailInfo tmp in this) foreach (DetailInfo tmp in this)
{ {
tmp.Changed -= new DetailInfoEvent(tmp_Changed); tmp.Changed -= new DetailInfoEvent(tmp_Changed);

View File

@ -45,10 +45,14 @@ namespace VEPROMS.CSLA.Library
} }
} }
} }
private void BuildRefreshList() private void ClearRefreshList()
{ {
_RefreshDocVersions = new List<DocVersion>(); _RefreshDocVersions = new List<DocVersion>();
_RefreshDocVersionAssociations = new List<DocVersionAssociation>(); _RefreshDocVersionAssociations = new List<DocVersionAssociation>();
}
private void BuildRefreshList()
{
ClearRefreshList();
AddToRefreshList(_RefreshDocVersions, _RefreshDocVersionAssociations); AddToRefreshList(_RefreshDocVersions, _RefreshDocVersionAssociations);
} }
private void ProcessRefreshList() private void ProcessRefreshList()
@ -64,6 +68,7 @@ namespace VEPROMS.CSLA.Library
{ {
AssociationInfo.Refresh(tmp); AssociationInfo.Refresh(tmp);
} }
ClearRefreshList();
} }
#endregion #endregion
#region Collection #region Collection
@ -597,8 +602,28 @@ namespace VEPROMS.CSLA.Library
{/* require use of factory methods */ {/* require use of factory methods */
AddToCache(this); AddToCache(this);
} }
private bool _Disposed = false;
private static int _CountCreated = 0;
private static int _CountDisposed = 0;
private static int _CountFinalized = 0;
private static int IncrementCountCreated
{ get { return ++_CountCreated; } }
private int _CountWhenCreated = IncrementCountCreated;
public static int CountCreated
{ get { return _CountCreated; } }
public static int CountNotDisposed
{ get { return _CountCreated - _CountDisposed; } }
public static int CountNotFinalized
{ get { return _CountCreated - _CountFinalized; } }
~DocVersion()
{
_CountFinalized++;
}
public void Dispose() public void Dispose()
{ {
if (_Disposed) return;
_CountDisposed++;
_Disposed = true;
RemoveFromDictionaries(); RemoveFromDictionaries();
} }
private void RemoveFromDictionaries() private void RemoveFromDictionaries()

View File

@ -25,7 +25,7 @@ namespace VEPROMS.CSLA.Library
/// </summary> /// </summary>
[Serializable()] [Serializable()]
[TypeConverter(typeof(DocVersionAssociationConverter))] [TypeConverter(typeof(DocVersionAssociationConverter))]
public partial class DocVersionAssociation : BusinessBase<DocVersionAssociation>, IVEHasBrokenRules public partial class DocVersionAssociation : BusinessBase<DocVersionAssociation>, IVEHasBrokenRules, IDisposable
{ {
#region Log4Net #region Log4Net
private static readonly log4net.ILog _MyLog = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); private static readonly log4net.ILog _MyLog = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
@ -398,6 +398,29 @@ namespace VEPROMS.CSLA.Library
MarkAsChild(); MarkAsChild();
Fetch(dr); Fetch(dr);
} }
private bool _Disposed = false;
private static int _CountCreated = 0;
private static int _CountDisposed = 0;
private static int _CountFinalized = 0;
private static int IncrementCountCreated
{ get { return ++_CountCreated; } }
private int _CountWhenCreated = IncrementCountCreated;
public static int CountCreated
{ get { return _CountCreated; } }
public static int CountNotDisposed
{ get { return _CountCreated - _CountDisposed; } }
public static int CountNotFinalized
{ get { return _CountCreated - _CountFinalized; } }
~DocVersionAssociation()
{
_CountFinalized++;
}
public void Dispose()
{
if (_Disposed) return;
_CountDisposed++;
_Disposed = true;
}
#endregion #endregion
#region Data Access Portal #region Data Access Portal
private void Fetch(SafeDataReader dr) private void Fetch(SafeDataReader dr)

View File

@ -25,7 +25,7 @@ namespace VEPROMS.CSLA.Library
/// </summary> /// </summary>
[Serializable()] [Serializable()]
[TypeConverter(typeof(DocVersionAssociationsConverter))] [TypeConverter(typeof(DocVersionAssociationsConverter))]
public partial class DocVersionAssociations : BusinessListBase<DocVersionAssociations, DocVersionAssociation>, ICustomTypeDescriptor, IVEHasBrokenRules public partial class DocVersionAssociations : BusinessListBase<DocVersionAssociations, DocVersionAssociation>, ICustomTypeDescriptor, IVEHasBrokenRules , IDisposable
{ {
#region Log4Net #region Log4Net
private static readonly log4net.ILog _MyLog = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); private static readonly log4net.ILog _MyLog = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
@ -189,6 +189,29 @@ namespace VEPROMS.CSLA.Library
MarkAsChild(); MarkAsChild();
Fetch(dr); Fetch(dr);
} }
private bool _Disposed = false;
private static int _CountCreated = 0;
private static int _CountDisposed = 0;
private static int _CountFinalized = 0;
private static int IncrementCountCreated
{ get { return ++_CountCreated; } }
private int _CountWhenCreated = IncrementCountCreated;
public static int CountCreated
{ get { return _CountCreated; } }
public static int CountNotDisposed
{ get { return _CountCreated - _CountDisposed; } }
public static int CountNotFinalized
{ get { return _CountCreated - _CountFinalized; } }
~DocVersionAssociations()
{
_CountFinalized++;
}
public void Dispose()
{
if (_Disposed) return;
_CountDisposed++;
_Disposed = true;
}
#endregion #endregion
#region Data Access Portal #region Data Access Portal
// called to load data from the database // called to load data from the database

View File

@ -297,8 +297,28 @@ namespace VEPROMS.CSLA.Library
{/* require use of factory methods */ {/* require use of factory methods */
AddToCache(this); AddToCache(this);
} }
private bool _Disposed = false;
private static int _CountCreated = 0;
private static int _CountDisposed = 0;
private static int _CountFinalized = 0;
private static int IncrementCountCreated
{ get { return ++_CountCreated; } }
private int _CountWhenCreated = IncrementCountCreated;
public static int CountCreated
{ get { return _CountCreated; } }
public static int CountNotDisposed
{ get { return _CountCreated - _CountDisposed; } }
public static int CountNotFinalized
{ get { return _CountCreated - _CountFinalized; } }
~DocVersionInfo()
{
_CountFinalized++;
}
public void Dispose() public void Dispose()
{ {
if (_Disposed) return;
_CountDisposed++;
_Disposed = true;
RemoveFromCache(this); RemoveFromCache(this);
if (!_CacheByPrimaryKey.ContainsKey(VersionID.ToString())) return; if (!_CacheByPrimaryKey.ContainsKey(VersionID.ToString())) return;
List<DocVersionInfo> listDocVersionInfo = _CacheByPrimaryKey[VersionID.ToString()]; // Get the list of items List<DocVersionInfo> listDocVersionInfo = _CacheByPrimaryKey[VersionID.ToString()]; // Get the list of items

View File

@ -47,8 +47,28 @@ namespace VEPROMS.CSLA.Library
this.OnListChanged(new ListChangedEventArgs(ListChangedType.ItemChanged, i)); this.OnListChanged(new ListChangedEventArgs(ListChangedType.ItemChanged, i));
} }
} }
private bool _Disposed = false;
private static int _CountCreated = 0;
private static int _CountDisposed = 0;
private static int _CountFinalized = 0;
private static int IncrementCountCreated
{ get { return ++_CountCreated; } }
private int _CountWhenCreated = IncrementCountCreated;
public static int CountCreated
{ get { return _CountCreated; } }
public static int CountNotDisposed
{ get { return _CountCreated - _CountDisposed; } }
public static int CountNotFinalized
{ get { return _CountCreated - _CountFinalized; } }
~DocVersionInfoList()
{
_CountFinalized++;
}
public void Dispose() public void Dispose()
{ {
if (_Disposed) return;
_CountDisposed++;
_Disposed = true;
foreach (DocVersionInfo tmp in this) foreach (DocVersionInfo tmp in this)
{ {
tmp.Changed -= new DocVersionInfoEvent(tmp_Changed); tmp.Changed -= new DocVersionInfoEvent(tmp_Changed);

View File

@ -61,12 +61,16 @@ namespace VEPROMS.CSLA.Library
} }
} }
} }
private void BuildRefreshList() private void ClearRefreshList()
{ {
_RefreshDocuments = new List<Document>(); _RefreshDocuments = new List<Document>();
_RefreshDocumentDROUsages = new List<DocumentDROUsage>(); _RefreshDocumentDROUsages = new List<DocumentDROUsage>();
_RefreshDocumentEntries = new List<DocumentEntry>(); _RefreshDocumentEntries = new List<DocumentEntry>();
_RefreshDocumentPdfs = new List<DocumentPdf>(); _RefreshDocumentPdfs = new List<DocumentPdf>();
}
private void BuildRefreshList()
{
ClearRefreshList();
AddToRefreshList(_RefreshDocuments, _RefreshDocumentDROUsages, _RefreshDocumentEntries, _RefreshDocumentPdfs); AddToRefreshList(_RefreshDocuments, _RefreshDocumentDROUsages, _RefreshDocumentEntries, _RefreshDocumentPdfs);
} }
private void ProcessRefreshList() private void ProcessRefreshList()
@ -87,6 +91,7 @@ namespace VEPROMS.CSLA.Library
{ {
PdfInfo.Refresh(this, tmp); PdfInfo.Refresh(this, tmp);
} }
ClearRefreshList();
} }
#endregion #endregion
#region Collection #region Collection
@ -609,8 +614,28 @@ namespace VEPROMS.CSLA.Library
{/* require use of factory methods */ {/* require use of factory methods */
AddToCache(this); AddToCache(this);
} }
private bool _Disposed = false;
private static int _CountCreated = 0;
private static int _CountDisposed = 0;
private static int _CountFinalized = 0;
private static int IncrementCountCreated
{ get { return ++_CountCreated; } }
private int _CountWhenCreated = IncrementCountCreated;
public static int CountCreated
{ get { return _CountCreated; } }
public static int CountNotDisposed
{ get { return _CountCreated - _CountDisposed; } }
public static int CountNotFinalized
{ get { return _CountCreated - _CountFinalized; } }
~Document()
{
_CountFinalized++;
}
public void Dispose() public void Dispose()
{ {
if (_Disposed) return;
_CountDisposed++;
_Disposed = true;
RemoveFromDictionaries(); RemoveFromDictionaries();
} }
private void RemoveFromDictionaries() private void RemoveFromDictionaries()

View File

@ -37,9 +37,13 @@ namespace VEPROMS.CSLA.Library
if (IsDirty) if (IsDirty)
refreshDocumentAudits.Add(this); refreshDocumentAudits.Add(this);
} }
private void BuildRefreshList() private void ClearRefreshList()
{ {
_RefreshDocumentAudits = new List<DocumentAudit>(); _RefreshDocumentAudits = new List<DocumentAudit>();
}
private void BuildRefreshList()
{
ClearRefreshList();
AddToRefreshList(_RefreshDocumentAudits); AddToRefreshList(_RefreshDocumentAudits);
} }
private void ProcessRefreshList() private void ProcessRefreshList()
@ -48,6 +52,7 @@ namespace VEPROMS.CSLA.Library
{ {
DocumentAuditInfo.Refresh(tmp); DocumentAuditInfo.Refresh(tmp);
} }
ClearRefreshList();
} }
#endregion #endregion
#region Collection #region Collection
@ -489,8 +494,28 @@ namespace VEPROMS.CSLA.Library
{/* require use of factory methods */ {/* require use of factory methods */
AddToCache(this); AddToCache(this);
} }
private bool _Disposed = false;
private static int _CountCreated = 0;
private static int _CountDisposed = 0;
private static int _CountFinalized = 0;
private static int IncrementCountCreated
{ get { return ++_CountCreated; } }
private int _CountWhenCreated = IncrementCountCreated;
public static int CountCreated
{ get { return _CountCreated; } }
public static int CountNotDisposed
{ get { return _CountCreated - _CountDisposed; } }
public static int CountNotFinalized
{ get { return _CountCreated - _CountFinalized; } }
~DocumentAudit()
{
_CountFinalized++;
}
public void Dispose() public void Dispose()
{ {
if (_Disposed) return;
_CountDisposed++;
_Disposed = true;
RemoveFromDictionaries(); RemoveFromDictionaries();
} }
private void RemoveFromDictionaries() private void RemoveFromDictionaries()

View File

@ -230,8 +230,28 @@ namespace VEPROMS.CSLA.Library
{/* require use of factory methods */ {/* require use of factory methods */
AddToCache(this); AddToCache(this);
} }
private bool _Disposed = false;
private static int _CountCreated = 0;
private static int _CountDisposed = 0;
private static int _CountFinalized = 0;
private static int IncrementCountCreated
{ get { return ++_CountCreated; } }
private int _CountWhenCreated = IncrementCountCreated;
public static int CountCreated
{ get { return _CountCreated; } }
public static int CountNotDisposed
{ get { return _CountCreated - _CountDisposed; } }
public static int CountNotFinalized
{ get { return _CountCreated - _CountFinalized; } }
~DocumentAuditInfo()
{
_CountFinalized++;
}
public void Dispose() public void Dispose()
{ {
if (_Disposed) return;
_CountDisposed++;
_Disposed = true;
RemoveFromCache(this); RemoveFromCache(this);
if (!_CacheByPrimaryKey.ContainsKey(AuditID.ToString())) return; if (!_CacheByPrimaryKey.ContainsKey(AuditID.ToString())) return;
List<DocumentAuditInfo> listDocumentAuditInfo = _CacheByPrimaryKey[AuditID.ToString()]; // Get the list of items List<DocumentAuditInfo> listDocumentAuditInfo = _CacheByPrimaryKey[AuditID.ToString()]; // Get the list of items

View File

@ -47,8 +47,28 @@ namespace VEPROMS.CSLA.Library
this.OnListChanged(new ListChangedEventArgs(ListChangedType.ItemChanged, i)); this.OnListChanged(new ListChangedEventArgs(ListChangedType.ItemChanged, i));
} }
} }
private bool _Disposed = false;
private static int _CountCreated = 0;
private static int _CountDisposed = 0;
private static int _CountFinalized = 0;
private static int IncrementCountCreated
{ get { return ++_CountCreated; } }
private int _CountWhenCreated = IncrementCountCreated;
public static int CountCreated
{ get { return _CountCreated; } }
public static int CountNotDisposed
{ get { return _CountCreated - _CountDisposed; } }
public static int CountNotFinalized
{ get { return _CountCreated - _CountFinalized; } }
~DocumentAuditInfoList()
{
_CountFinalized++;
}
public void Dispose() public void Dispose()
{ {
if (_Disposed) return;
_CountDisposed++;
_Disposed = true;
foreach (DocumentAuditInfo tmp in this) foreach (DocumentAuditInfo tmp in this)
{ {
tmp.Changed -= new DocumentAuditInfoEvent(tmp_Changed); tmp.Changed -= new DocumentAuditInfoEvent(tmp_Changed);

View File

@ -25,7 +25,7 @@ namespace VEPROMS.CSLA.Library
/// </summary> /// </summary>
[Serializable()] [Serializable()]
[TypeConverter(typeof(DocumentDROUsageConverter))] [TypeConverter(typeof(DocumentDROUsageConverter))]
public partial class DocumentDROUsage : BusinessBase<DocumentDROUsage>, IVEHasBrokenRules public partial class DocumentDROUsage : BusinessBase<DocumentDROUsage>, IVEHasBrokenRules, IDisposable
{ {
#region Log4Net #region Log4Net
private static readonly log4net.ILog _MyLog = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); private static readonly log4net.ILog _MyLog = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
@ -446,6 +446,29 @@ namespace VEPROMS.CSLA.Library
MarkAsChild(); MarkAsChild();
Fetch(dr); Fetch(dr);
} }
private bool _Disposed = false;
private static int _CountCreated = 0;
private static int _CountDisposed = 0;
private static int _CountFinalized = 0;
private static int IncrementCountCreated
{ get { return ++_CountCreated; } }
private int _CountWhenCreated = IncrementCountCreated;
public static int CountCreated
{ get { return _CountCreated; } }
public static int CountNotDisposed
{ get { return _CountCreated - _CountDisposed; } }
public static int CountNotFinalized
{ get { return _CountCreated - _CountFinalized; } }
~DocumentDROUsage()
{
_CountFinalized++;
}
public void Dispose()
{
if (_Disposed) return;
_CountDisposed++;
_Disposed = true;
}
#endregion #endregion
#region Data Access Portal #region Data Access Portal
private void Fetch(SafeDataReader dr) private void Fetch(SafeDataReader dr)

View File

@ -25,7 +25,7 @@ namespace VEPROMS.CSLA.Library
/// </summary> /// </summary>
[Serializable()] [Serializable()]
[TypeConverter(typeof(DocumentDROUsagesConverter))] [TypeConverter(typeof(DocumentDROUsagesConverter))]
public partial class DocumentDROUsages : BusinessListBase<DocumentDROUsages, DocumentDROUsage>, ICustomTypeDescriptor, IVEHasBrokenRules public partial class DocumentDROUsages : BusinessListBase<DocumentDROUsages, DocumentDROUsage>, ICustomTypeDescriptor, IVEHasBrokenRules , IDisposable
{ {
#region Log4Net #region Log4Net
private static readonly log4net.ILog _MyLog = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); private static readonly log4net.ILog _MyLog = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
@ -170,6 +170,29 @@ namespace VEPROMS.CSLA.Library
MarkAsChild(); MarkAsChild();
Fetch(dr); Fetch(dr);
} }
private bool _Disposed = false;
private static int _CountCreated = 0;
private static int _CountDisposed = 0;
private static int _CountFinalized = 0;
private static int IncrementCountCreated
{ get { return ++_CountCreated; } }
private int _CountWhenCreated = IncrementCountCreated;
public static int CountCreated
{ get { return _CountCreated; } }
public static int CountNotDisposed
{ get { return _CountCreated - _CountDisposed; } }
public static int CountNotFinalized
{ get { return _CountCreated - _CountFinalized; } }
~DocumentDROUsages()
{
_CountFinalized++;
}
public void Dispose()
{
if (_Disposed) return;
_CountDisposed++;
_Disposed = true;
}
#endregion #endregion
#region Data Access Portal #region Data Access Portal
// called to load data from the database // called to load data from the database

View File

@ -25,7 +25,7 @@ namespace VEPROMS.CSLA.Library
/// </summary> /// </summary>
[Serializable()] [Serializable()]
[TypeConverter(typeof(DocumentEntriesConverter))] [TypeConverter(typeof(DocumentEntriesConverter))]
public partial class DocumentEntries : BusinessListBase<DocumentEntries, DocumentEntry>, ICustomTypeDescriptor, IVEHasBrokenRules public partial class DocumentEntries : BusinessListBase<DocumentEntries, DocumentEntry>, ICustomTypeDescriptor, IVEHasBrokenRules , IDisposable
{ {
#region Log4Net #region Log4Net
private static readonly log4net.ILog _MyLog = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); private static readonly log4net.ILog _MyLog = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
@ -170,6 +170,29 @@ namespace VEPROMS.CSLA.Library
MarkAsChild(); MarkAsChild();
Fetch(dr); Fetch(dr);
} }
private bool _Disposed = false;
private static int _CountCreated = 0;
private static int _CountDisposed = 0;
private static int _CountFinalized = 0;
private static int IncrementCountCreated
{ get { return ++_CountCreated; } }
private int _CountWhenCreated = IncrementCountCreated;
public static int CountCreated
{ get { return _CountCreated; } }
public static int CountNotDisposed
{ get { return _CountCreated - _CountDisposed; } }
public static int CountNotFinalized
{ get { return _CountCreated - _CountFinalized; } }
~DocumentEntries()
{
_CountFinalized++;
}
public void Dispose()
{
if (_Disposed) return;
_CountDisposed++;
_Disposed = true;
}
#endregion #endregion
#region Data Access Portal #region Data Access Portal
// called to load data from the database // called to load data from the database

View File

@ -25,7 +25,7 @@ namespace VEPROMS.CSLA.Library
/// </summary> /// </summary>
[Serializable()] [Serializable()]
[TypeConverter(typeof(DocumentEntryConverter))] [TypeConverter(typeof(DocumentEntryConverter))]
public partial class DocumentEntry : BusinessBase<DocumentEntry>, IVEHasBrokenRules public partial class DocumentEntry : BusinessBase<DocumentEntry>, IVEHasBrokenRules, IDisposable
{ {
#region Log4Net #region Log4Net
private static readonly log4net.ILog _MyLog = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); private static readonly log4net.ILog _MyLog = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
@ -340,6 +340,29 @@ namespace VEPROMS.CSLA.Library
MarkAsChild(); MarkAsChild();
Fetch(dr); Fetch(dr);
} }
private bool _Disposed = false;
private static int _CountCreated = 0;
private static int _CountDisposed = 0;
private static int _CountFinalized = 0;
private static int IncrementCountCreated
{ get { return ++_CountCreated; } }
private int _CountWhenCreated = IncrementCountCreated;
public static int CountCreated
{ get { return _CountCreated; } }
public static int CountNotDisposed
{ get { return _CountCreated - _CountDisposed; } }
public static int CountNotFinalized
{ get { return _CountCreated - _CountFinalized; } }
~DocumentEntry()
{
_CountFinalized++;
}
public void Dispose()
{
if (_Disposed) return;
_CountDisposed++;
_Disposed = true;
}
#endregion #endregion
#region Data Access Portal #region Data Access Portal
private void Fetch(SafeDataReader dr) private void Fetch(SafeDataReader dr)

View File

@ -320,8 +320,28 @@ namespace VEPROMS.CSLA.Library
{/* require use of factory methods */ {/* require use of factory methods */
AddToCache(this); AddToCache(this);
} }
private bool _Disposed = false;
private static int _CountCreated = 0;
private static int _CountDisposed = 0;
private static int _CountFinalized = 0;
private static int IncrementCountCreated
{ get { return ++_CountCreated; } }
private int _CountWhenCreated = IncrementCountCreated;
public static int CountCreated
{ get { return _CountCreated; } }
public static int CountNotDisposed
{ get { return _CountCreated - _CountDisposed; } }
public static int CountNotFinalized
{ get { return _CountCreated - _CountFinalized; } }
~DocumentInfo()
{
_CountFinalized++;
}
public void Dispose() public void Dispose()
{ {
if (_Disposed) return;
_CountDisposed++;
_Disposed = true;
RemoveFromCache(this); RemoveFromCache(this);
if (!_CacheByPrimaryKey.ContainsKey(DocID.ToString())) return; if (!_CacheByPrimaryKey.ContainsKey(DocID.ToString())) return;
List<DocumentInfo> listDocumentInfo = _CacheByPrimaryKey[DocID.ToString()]; // Get the list of items List<DocumentInfo> listDocumentInfo = _CacheByPrimaryKey[DocID.ToString()]; // Get the list of items

View File

@ -47,8 +47,28 @@ namespace VEPROMS.CSLA.Library
this.OnListChanged(new ListChangedEventArgs(ListChangedType.ItemChanged, i)); this.OnListChanged(new ListChangedEventArgs(ListChangedType.ItemChanged, i));
} }
} }
private bool _Disposed = false;
private static int _CountCreated = 0;
private static int _CountDisposed = 0;
private static int _CountFinalized = 0;
private static int IncrementCountCreated
{ get { return ++_CountCreated; } }
private int _CountWhenCreated = IncrementCountCreated;
public static int CountCreated
{ get { return _CountCreated; } }
public static int CountNotDisposed
{ get { return _CountCreated - _CountDisposed; } }
public static int CountNotFinalized
{ get { return _CountCreated - _CountFinalized; } }
~DocumentInfoList()
{
_CountFinalized++;
}
public void Dispose() public void Dispose()
{ {
if (_Disposed) return;
_CountDisposed++;
_Disposed = true;
foreach (DocumentInfo tmp in this) foreach (DocumentInfo tmp in this)
{ {
tmp.Changed -= new DocumentInfoEvent(tmp_Changed); tmp.Changed -= new DocumentInfoEvent(tmp_Changed);

View File

@ -25,7 +25,7 @@ namespace VEPROMS.CSLA.Library
/// </summary> /// </summary>
[Serializable()] [Serializable()]
[TypeConverter(typeof(DocumentPdfConverter))] [TypeConverter(typeof(DocumentPdfConverter))]
public partial class DocumentPdf : BusinessBase<DocumentPdf>, IVEHasBrokenRules public partial class DocumentPdf : BusinessBase<DocumentPdf>, IVEHasBrokenRules, IDisposable
{ {
#region Log4Net #region Log4Net
private static readonly log4net.ILog _MyLog = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); private static readonly log4net.ILog _MyLog = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
@ -354,6 +354,29 @@ namespace VEPROMS.CSLA.Library
MarkAsChild(); MarkAsChild();
Fetch(dr); Fetch(dr);
} }
private bool _Disposed = false;
private static int _CountCreated = 0;
private static int _CountDisposed = 0;
private static int _CountFinalized = 0;
private static int IncrementCountCreated
{ get { return ++_CountCreated; } }
private int _CountWhenCreated = IncrementCountCreated;
public static int CountCreated
{ get { return _CountCreated; } }
public static int CountNotDisposed
{ get { return _CountCreated - _CountDisposed; } }
public static int CountNotFinalized
{ get { return _CountCreated - _CountFinalized; } }
~DocumentPdf()
{
_CountFinalized++;
}
public void Dispose()
{
if (_Disposed) return;
_CountDisposed++;
_Disposed = true;
}
#endregion #endregion
#region Data Access Portal #region Data Access Portal
private void Fetch(SafeDataReader dr) private void Fetch(SafeDataReader dr)

View File

@ -25,7 +25,7 @@ namespace VEPROMS.CSLA.Library
/// </summary> /// </summary>
[Serializable()] [Serializable()]
[TypeConverter(typeof(DocumentPdfsConverter))] [TypeConverter(typeof(DocumentPdfsConverter))]
public partial class DocumentPdfs : BusinessListBase<DocumentPdfs, DocumentPdf>, ICustomTypeDescriptor, IVEHasBrokenRules public partial class DocumentPdfs : BusinessListBase<DocumentPdfs, DocumentPdf>, ICustomTypeDescriptor, IVEHasBrokenRules , IDisposable
{ {
#region Log4Net #region Log4Net
private static readonly log4net.ILog _MyLog = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); private static readonly log4net.ILog _MyLog = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
@ -175,6 +175,29 @@ namespace VEPROMS.CSLA.Library
MarkAsChild(); MarkAsChild();
Fetch(dr); Fetch(dr);
} }
private bool _Disposed = false;
private static int _CountCreated = 0;
private static int _CountDisposed = 0;
private static int _CountFinalized = 0;
private static int IncrementCountCreated
{ get { return ++_CountCreated; } }
private int _CountWhenCreated = IncrementCountCreated;
public static int CountCreated
{ get { return _CountCreated; } }
public static int CountNotDisposed
{ get { return _CountCreated - _CountDisposed; } }
public static int CountNotFinalized
{ get { return _CountCreated - _CountFinalized; } }
~DocumentPdfs()
{
_CountFinalized++;
}
public void Dispose()
{
if (_Disposed) return;
_CountDisposed++;
_Disposed = true;
}
#endregion #endregion
#region Data Access Portal #region Data Access Portal
// called to load data from the database // called to load data from the database

View File

@ -37,9 +37,13 @@ namespace VEPROMS.CSLA.Library
if (IsDirty) if (IsDirty)
refreshEntries.Add(this); refreshEntries.Add(this);
} }
private void BuildRefreshList() private void ClearRefreshList()
{ {
_RefreshEntries = new List<Entry>(); _RefreshEntries = new List<Entry>();
}
private void BuildRefreshList()
{
ClearRefreshList();
AddToRefreshList(_RefreshEntries); AddToRefreshList(_RefreshEntries);
} }
private void ProcessRefreshList() private void ProcessRefreshList()
@ -49,6 +53,7 @@ namespace VEPROMS.CSLA.Library
EntryInfo.Refresh(tmp); EntryInfo.Refresh(tmp);
if (tmp._MyDocument != null) DocumentInfo.Refresh(tmp._MyDocument); if (tmp._MyDocument != null) DocumentInfo.Refresh(tmp._MyDocument);
} }
ClearRefreshList();
} }
#endregion #endregion
#region Collection #region Collection
@ -362,8 +367,28 @@ namespace VEPROMS.CSLA.Library
{/* require use of factory methods */ {/* require use of factory methods */
AddToCache(this); AddToCache(this);
} }
private bool _Disposed = false;
private static int _CountCreated = 0;
private static int _CountDisposed = 0;
private static int _CountFinalized = 0;
private static int IncrementCountCreated
{ get { return ++_CountCreated; } }
private int _CountWhenCreated = IncrementCountCreated;
public static int CountCreated
{ get { return _CountCreated; } }
public static int CountNotDisposed
{ get { return _CountCreated - _CountDisposed; } }
public static int CountNotFinalized
{ get { return _CountCreated - _CountFinalized; } }
~Entry()
{
_CountFinalized++;
}
public void Dispose() public void Dispose()
{ {
if (_Disposed) return;
_CountDisposed++;
_Disposed = true;
RemoveFromDictionaries(); RemoveFromDictionaries();
} }
private void RemoveFromDictionaries() private void RemoveFromDictionaries()

View File

@ -37,9 +37,13 @@ namespace VEPROMS.CSLA.Library
if (IsDirty) if (IsDirty)
refreshEntryAudits.Add(this); refreshEntryAudits.Add(this);
} }
private void BuildRefreshList() private void ClearRefreshList()
{ {
_RefreshEntryAudits = new List<EntryAudit>(); _RefreshEntryAudits = new List<EntryAudit>();
}
private void BuildRefreshList()
{
ClearRefreshList();
AddToRefreshList(_RefreshEntryAudits); AddToRefreshList(_RefreshEntryAudits);
} }
private void ProcessRefreshList() private void ProcessRefreshList()
@ -48,6 +52,7 @@ namespace VEPROMS.CSLA.Library
{ {
EntryAuditInfo.Refresh(tmp); EntryAuditInfo.Refresh(tmp);
} }
ClearRefreshList();
} }
#endregion #endregion
#region Collection #region Collection
@ -361,8 +366,28 @@ namespace VEPROMS.CSLA.Library
{/* require use of factory methods */ {/* require use of factory methods */
AddToCache(this); AddToCache(this);
} }
private bool _Disposed = false;
private static int _CountCreated = 0;
private static int _CountDisposed = 0;
private static int _CountFinalized = 0;
private static int IncrementCountCreated
{ get { return ++_CountCreated; } }
private int _CountWhenCreated = IncrementCountCreated;
public static int CountCreated
{ get { return _CountCreated; } }
public static int CountNotDisposed
{ get { return _CountCreated - _CountDisposed; } }
public static int CountNotFinalized
{ get { return _CountCreated - _CountFinalized; } }
~EntryAudit()
{
_CountFinalized++;
}
public void Dispose() public void Dispose()
{ {
if (_Disposed) return;
_CountDisposed++;
_Disposed = true;
RemoveFromDictionaries(); RemoveFromDictionaries();
} }
private void RemoveFromDictionaries() private void RemoveFromDictionaries()

View File

@ -180,8 +180,28 @@ namespace VEPROMS.CSLA.Library
{/* require use of factory methods */ {/* require use of factory methods */
AddToCache(this); AddToCache(this);
} }
private bool _Disposed = false;
private static int _CountCreated = 0;
private static int _CountDisposed = 0;
private static int _CountFinalized = 0;
private static int IncrementCountCreated
{ get { return ++_CountCreated; } }
private int _CountWhenCreated = IncrementCountCreated;
public static int CountCreated
{ get { return _CountCreated; } }
public static int CountNotDisposed
{ get { return _CountCreated - _CountDisposed; } }
public static int CountNotFinalized
{ get { return _CountCreated - _CountFinalized; } }
~EntryAuditInfo()
{
_CountFinalized++;
}
public void Dispose() public void Dispose()
{ {
if (_Disposed) return;
_CountDisposed++;
_Disposed = true;
RemoveFromCache(this); RemoveFromCache(this);
if (!_CacheByPrimaryKey.ContainsKey(AuditID.ToString())) return; if (!_CacheByPrimaryKey.ContainsKey(AuditID.ToString())) return;
List<EntryAuditInfo> listEntryAuditInfo = _CacheByPrimaryKey[AuditID.ToString()]; // Get the list of items List<EntryAuditInfo> listEntryAuditInfo = _CacheByPrimaryKey[AuditID.ToString()]; // Get the list of items

View File

@ -47,8 +47,28 @@ namespace VEPROMS.CSLA.Library
this.OnListChanged(new ListChangedEventArgs(ListChangedType.ItemChanged, i)); this.OnListChanged(new ListChangedEventArgs(ListChangedType.ItemChanged, i));
} }
} }
private bool _Disposed = false;
private static int _CountCreated = 0;
private static int _CountDisposed = 0;
private static int _CountFinalized = 0;
private static int IncrementCountCreated
{ get { return ++_CountCreated; } }
private int _CountWhenCreated = IncrementCountCreated;
public static int CountCreated
{ get { return _CountCreated; } }
public static int CountNotDisposed
{ get { return _CountCreated - _CountDisposed; } }
public static int CountNotFinalized
{ get { return _CountCreated - _CountFinalized; } }
~EntryAuditInfoList()
{
_CountFinalized++;
}
public void Dispose() public void Dispose()
{ {
if (_Disposed) return;
_CountDisposed++;
_Disposed = true;
foreach (EntryAuditInfo tmp in this) foreach (EntryAuditInfo tmp in this)
{ {
tmp.Changed -= new EntryAuditInfoEvent(tmp_Changed); tmp.Changed -= new EntryAuditInfoEvent(tmp_Changed);

View File

@ -185,8 +185,28 @@ namespace VEPROMS.CSLA.Library
{/* require use of factory methods */ {/* require use of factory methods */
AddToCache(this); AddToCache(this);
} }
private bool _Disposed = false;
private static int _CountCreated = 0;
private static int _CountDisposed = 0;
private static int _CountFinalized = 0;
private static int IncrementCountCreated
{ get { return ++_CountCreated; } }
private int _CountWhenCreated = IncrementCountCreated;
public static int CountCreated
{ get { return _CountCreated; } }
public static int CountNotDisposed
{ get { return _CountCreated - _CountDisposed; } }
public static int CountNotFinalized
{ get { return _CountCreated - _CountFinalized; } }
~EntryInfo()
{
_CountFinalized++;
}
public void Dispose() public void Dispose()
{ {
if (_Disposed) return;
_CountDisposed++;
_Disposed = true;
RemoveFromCache(this); RemoveFromCache(this);
if (!_CacheByPrimaryKey.ContainsKey(ContentID.ToString())) return; if (!_CacheByPrimaryKey.ContainsKey(ContentID.ToString())) return;
List<EntryInfo> listEntryInfo = _CacheByPrimaryKey[ContentID.ToString()]; // Get the list of items List<EntryInfo> listEntryInfo = _CacheByPrimaryKey[ContentID.ToString()]; // Get the list of items

View File

@ -47,8 +47,28 @@ namespace VEPROMS.CSLA.Library
this.OnListChanged(new ListChangedEventArgs(ListChangedType.ItemChanged, i)); this.OnListChanged(new ListChangedEventArgs(ListChangedType.ItemChanged, i));
} }
} }
private bool _Disposed = false;
private static int _CountCreated = 0;
private static int _CountDisposed = 0;
private static int _CountFinalized = 0;
private static int IncrementCountCreated
{ get { return ++_CountCreated; } }
private int _CountWhenCreated = IncrementCountCreated;
public static int CountCreated
{ get { return _CountCreated; } }
public static int CountNotDisposed
{ get { return _CountCreated - _CountDisposed; } }
public static int CountNotFinalized
{ get { return _CountCreated - _CountFinalized; } }
~EntryInfoList()
{
_CountFinalized++;
}
public void Dispose() public void Dispose()
{ {
if (_Disposed) return;
_CountDisposed++;
_Disposed = true;
foreach (EntryInfo tmp in this) foreach (EntryInfo tmp in this)
{ {
tmp.Changed -= new EntryInfoEvent(tmp_Changed); tmp.Changed -= new EntryInfoEvent(tmp_Changed);

View File

@ -37,9 +37,13 @@ namespace VEPROMS.CSLA.Library
if (IsDirty) if (IsDirty)
refreshFigures.Add(this); refreshFigures.Add(this);
} }
private void BuildRefreshList() private void ClearRefreshList()
{ {
_RefreshFigures = new List<Figure>(); _RefreshFigures = new List<Figure>();
}
private void BuildRefreshList()
{
ClearRefreshList();
AddToRefreshList(_RefreshFigures); AddToRefreshList(_RefreshFigures);
} }
private void ProcessRefreshList() private void ProcessRefreshList()
@ -50,6 +54,7 @@ namespace VEPROMS.CSLA.Library
if (tmp._MyROFst != null) ROFstInfo.Refresh(tmp._MyROFst); if (tmp._MyROFst != null) ROFstInfo.Refresh(tmp._MyROFst);
if (tmp._MyROImage != null) ROImageInfo.Refresh(tmp._MyROImage); if (tmp._MyROImage != null) ROImageInfo.Refresh(tmp._MyROImage);
} }
ClearRefreshList();
} }
#endregion #endregion
#region Collection #region Collection
@ -437,8 +442,28 @@ namespace VEPROMS.CSLA.Library
{/* require use of factory methods */ {/* require use of factory methods */
AddToCache(this); AddToCache(this);
} }
private bool _Disposed = false;
private static int _CountCreated = 0;
private static int _CountDisposed = 0;
private static int _CountFinalized = 0;
private static int IncrementCountCreated
{ get { return ++_CountCreated; } }
private int _CountWhenCreated = IncrementCountCreated;
public static int CountCreated
{ get { return _CountCreated; } }
public static int CountNotDisposed
{ get { return _CountCreated - _CountDisposed; } }
public static int CountNotFinalized
{ get { return _CountCreated - _CountFinalized; } }
~Figure()
{
_CountFinalized++;
}
public void Dispose() public void Dispose()
{ {
if (_Disposed) return;
_CountDisposed++;
_Disposed = true;
RemoveFromDictionaries(); RemoveFromDictionaries();
} }
private void RemoveFromDictionaries() private void RemoveFromDictionaries()

View File

@ -204,8 +204,28 @@ namespace VEPROMS.CSLA.Library
{/* require use of factory methods */ {/* require use of factory methods */
AddToCache(this); AddToCache(this);
} }
private bool _Disposed = false;
private static int _CountCreated = 0;
private static int _CountDisposed = 0;
private static int _CountFinalized = 0;
private static int IncrementCountCreated
{ get { return ++_CountCreated; } }
private int _CountWhenCreated = IncrementCountCreated;
public static int CountCreated
{ get { return _CountCreated; } }
public static int CountNotDisposed
{ get { return _CountCreated - _CountDisposed; } }
public static int CountNotFinalized
{ get { return _CountCreated - _CountFinalized; } }
~FigureInfo()
{
_CountFinalized++;
}
public void Dispose() public void Dispose()
{ {
if (_Disposed) return;
_CountDisposed++;
_Disposed = true;
RemoveFromCache(this); RemoveFromCache(this);
if (!_CacheByPrimaryKey.ContainsKey(FigureID.ToString())) return; if (!_CacheByPrimaryKey.ContainsKey(FigureID.ToString())) return;
List<FigureInfo> listFigureInfo = _CacheByPrimaryKey[FigureID.ToString()]; // Get the list of items List<FigureInfo> listFigureInfo = _CacheByPrimaryKey[FigureID.ToString()]; // Get the list of items

View File

@ -47,8 +47,28 @@ namespace VEPROMS.CSLA.Library
this.OnListChanged(new ListChangedEventArgs(ListChangedType.ItemChanged, i)); this.OnListChanged(new ListChangedEventArgs(ListChangedType.ItemChanged, i));
} }
} }
private bool _Disposed = false;
private static int _CountCreated = 0;
private static int _CountDisposed = 0;
private static int _CountFinalized = 0;
private static int IncrementCountCreated
{ get { return ++_CountCreated; } }
private int _CountWhenCreated = IncrementCountCreated;
public static int CountCreated
{ get { return _CountCreated; } }
public static int CountNotDisposed
{ get { return _CountCreated - _CountDisposed; } }
public static int CountNotFinalized
{ get { return _CountCreated - _CountFinalized; } }
~FigureInfoList()
{
_CountFinalized++;
}
public void Dispose() public void Dispose()
{ {
if (_Disposed) return;
_CountDisposed++;
_Disposed = true;
foreach (FigureInfo tmp in this) foreach (FigureInfo tmp in this)
{ {
tmp.Changed -= new FigureInfoEvent(tmp_Changed); tmp.Changed -= new FigureInfoEvent(tmp_Changed);

View File

@ -60,11 +60,15 @@ namespace VEPROMS.CSLA.Library
} }
} }
} }
private void BuildRefreshList() private void ClearRefreshList()
{ {
_RefreshFolders = new List<Folder>(); _RefreshFolders = new List<Folder>();
_RefreshFolderAssignments = new List<FolderAssignment>(); _RefreshFolderAssignments = new List<FolderAssignment>();
_RefreshFolderDocVersions = new List<FolderDocVersion>(); _RefreshFolderDocVersions = new List<FolderDocVersion>();
}
private void BuildRefreshList()
{
ClearRefreshList();
AddToRefreshList(_RefreshFolders, _RefreshFolderAssignments, _RefreshFolderDocVersions); AddToRefreshList(_RefreshFolders, _RefreshFolderAssignments, _RefreshFolderDocVersions);
} }
private void ProcessRefreshList() private void ProcessRefreshList()
@ -83,6 +87,7 @@ namespace VEPROMS.CSLA.Library
{ {
DocVersionInfo.Refresh(tmp); DocVersionInfo.Refresh(tmp);
} }
ClearRefreshList();
} }
#endregion #endregion
#region Collection #region Collection
@ -728,8 +733,28 @@ namespace VEPROMS.CSLA.Library
{/* require use of factory methods */ {/* require use of factory methods */
AddToCache(this); AddToCache(this);
} }
private bool _Disposed = false;
private static int _CountCreated = 0;
private static int _CountDisposed = 0;
private static int _CountFinalized = 0;
private static int IncrementCountCreated
{ get { return ++_CountCreated; } }
private int _CountWhenCreated = IncrementCountCreated;
public static int CountCreated
{ get { return _CountCreated; } }
public static int CountNotDisposed
{ get { return _CountCreated - _CountDisposed; } }
public static int CountNotFinalized
{ get { return _CountCreated - _CountFinalized; } }
~Folder()
{
_CountFinalized++;
}
public void Dispose() public void Dispose()
{ {
if (_Disposed) return;
_CountDisposed++;
_Disposed = true;
RemoveFromDictionaries(); RemoveFromDictionaries();
} }
private void RemoveFromDictionaries() private void RemoveFromDictionaries()

View File

@ -25,7 +25,7 @@ namespace VEPROMS.CSLA.Library
/// </summary> /// </summary>
[Serializable()] [Serializable()]
[TypeConverter(typeof(FolderAssignmentConverter))] [TypeConverter(typeof(FolderAssignmentConverter))]
public partial class FolderAssignment : BusinessBase<FolderAssignment>, IVEHasBrokenRules public partial class FolderAssignment : BusinessBase<FolderAssignment>, IVEHasBrokenRules, IDisposable
{ {
#region Log4Net #region Log4Net
private static readonly log4net.ILog _MyLog = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); private static readonly log4net.ILog _MyLog = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
@ -555,6 +555,29 @@ namespace VEPROMS.CSLA.Library
MarkAsChild(); MarkAsChild();
Fetch(dr); Fetch(dr);
} }
private bool _Disposed = false;
private static int _CountCreated = 0;
private static int _CountDisposed = 0;
private static int _CountFinalized = 0;
private static int IncrementCountCreated
{ get { return ++_CountCreated; } }
private int _CountWhenCreated = IncrementCountCreated;
public static int CountCreated
{ get { return _CountCreated; } }
public static int CountNotDisposed
{ get { return _CountCreated - _CountDisposed; } }
public static int CountNotFinalized
{ get { return _CountCreated - _CountFinalized; } }
~FolderAssignment()
{
_CountFinalized++;
}
public void Dispose()
{
if (_Disposed) return;
_CountDisposed++;
_Disposed = true;
}
#endregion #endregion
#region Data Access Portal #region Data Access Portal
private void Fetch(SafeDataReader dr) private void Fetch(SafeDataReader dr)

View File

@ -25,7 +25,7 @@ namespace VEPROMS.CSLA.Library
/// </summary> /// </summary>
[Serializable()] [Serializable()]
[TypeConverter(typeof(FolderAssignmentsConverter))] [TypeConverter(typeof(FolderAssignmentsConverter))]
public partial class FolderAssignments : BusinessListBase<FolderAssignments, FolderAssignment>, ICustomTypeDescriptor, IVEHasBrokenRules public partial class FolderAssignments : BusinessListBase<FolderAssignments, FolderAssignment>, ICustomTypeDescriptor, IVEHasBrokenRules , IDisposable
{ {
#region Log4Net #region Log4Net
private static readonly log4net.ILog _MyLog = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); private static readonly log4net.ILog _MyLog = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
@ -170,6 +170,29 @@ namespace VEPROMS.CSLA.Library
MarkAsChild(); MarkAsChild();
Fetch(dr); Fetch(dr);
} }
private bool _Disposed = false;
private static int _CountCreated = 0;
private static int _CountDisposed = 0;
private static int _CountFinalized = 0;
private static int IncrementCountCreated
{ get { return ++_CountCreated; } }
private int _CountWhenCreated = IncrementCountCreated;
public static int CountCreated
{ get { return _CountCreated; } }
public static int CountNotDisposed
{ get { return _CountCreated - _CountDisposed; } }
public static int CountNotFinalized
{ get { return _CountCreated - _CountFinalized; } }
~FolderAssignments()
{
_CountFinalized++;
}
public void Dispose()
{
if (_Disposed) return;
_CountDisposed++;
_Disposed = true;
}
#endregion #endregion
#region Data Access Portal #region Data Access Portal
// called to load data from the database // called to load data from the database

View File

@ -25,7 +25,7 @@ namespace VEPROMS.CSLA.Library
/// </summary> /// </summary>
[Serializable()] [Serializable()]
[TypeConverter(typeof(FolderDocVersionConverter))] [TypeConverter(typeof(FolderDocVersionConverter))]
public partial class FolderDocVersion : BusinessBase<FolderDocVersion>, IVEHasBrokenRules public partial class FolderDocVersion : BusinessBase<FolderDocVersion>, IVEHasBrokenRules, IDisposable
{ {
#region Log4Net #region Log4Net
private static readonly log4net.ILog _MyLog = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); private static readonly log4net.ILog _MyLog = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
@ -444,6 +444,29 @@ namespace VEPROMS.CSLA.Library
MarkAsChild(); MarkAsChild();
Fetch(dr); Fetch(dr);
} }
private bool _Disposed = false;
private static int _CountCreated = 0;
private static int _CountDisposed = 0;
private static int _CountFinalized = 0;
private static int IncrementCountCreated
{ get { return ++_CountCreated; } }
private int _CountWhenCreated = IncrementCountCreated;
public static int CountCreated
{ get { return _CountCreated; } }
public static int CountNotDisposed
{ get { return _CountCreated - _CountDisposed; } }
public static int CountNotFinalized
{ get { return _CountCreated - _CountFinalized; } }
~FolderDocVersion()
{
_CountFinalized++;
}
public void Dispose()
{
if (_Disposed) return;
_CountDisposed++;
_Disposed = true;
}
#endregion #endregion
#region Data Access Portal #region Data Access Portal
private void Fetch(SafeDataReader dr) private void Fetch(SafeDataReader dr)

View File

@ -25,7 +25,7 @@ namespace VEPROMS.CSLA.Library
/// </summary> /// </summary>
[Serializable()] [Serializable()]
[TypeConverter(typeof(FolderDocVersionsConverter))] [TypeConverter(typeof(FolderDocVersionsConverter))]
public partial class FolderDocVersions : BusinessListBase<FolderDocVersions, FolderDocVersion>, ICustomTypeDescriptor, IVEHasBrokenRules public partial class FolderDocVersions : BusinessListBase<FolderDocVersions, FolderDocVersion>, ICustomTypeDescriptor, IVEHasBrokenRules , IDisposable
{ {
#region Log4Net #region Log4Net
private static readonly log4net.ILog _MyLog = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); private static readonly log4net.ILog _MyLog = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
@ -170,6 +170,29 @@ namespace VEPROMS.CSLA.Library
MarkAsChild(); MarkAsChild();
Fetch(dr); Fetch(dr);
} }
private bool _Disposed = false;
private static int _CountCreated = 0;
private static int _CountDisposed = 0;
private static int _CountFinalized = 0;
private static int IncrementCountCreated
{ get { return ++_CountCreated; } }
private int _CountWhenCreated = IncrementCountCreated;
public static int CountCreated
{ get { return _CountCreated; } }
public static int CountNotDisposed
{ get { return _CountCreated - _CountDisposed; } }
public static int CountNotFinalized
{ get { return _CountCreated - _CountFinalized; } }
~FolderDocVersions()
{
_CountFinalized++;
}
public void Dispose()
{
if (_Disposed) return;
_CountDisposed++;
_Disposed = true;
}
#endregion #endregion
#region Data Access Portal #region Data Access Portal
// called to load data from the database // called to load data from the database

View File

@ -380,8 +380,28 @@ namespace VEPROMS.CSLA.Library
{/* require use of factory methods */ {/* require use of factory methods */
AddToCache(this); AddToCache(this);
} }
private bool _Disposed = false;
private static int _CountCreated = 0;
private static int _CountDisposed = 0;
private static int _CountFinalized = 0;
private static int IncrementCountCreated
{ get { return ++_CountCreated; } }
private int _CountWhenCreated = IncrementCountCreated;
public static int CountCreated
{ get { return _CountCreated; } }
public static int CountNotDisposed
{ get { return _CountCreated - _CountDisposed; } }
public static int CountNotFinalized
{ get { return _CountCreated - _CountFinalized; } }
~FolderInfo()
{
_CountFinalized++;
}
public void Dispose() public void Dispose()
{ {
if (_Disposed) return;
_CountDisposed++;
_Disposed = true;
RemoveFromCache(this); RemoveFromCache(this);
if (!_CacheByPrimaryKey.ContainsKey(FolderID.ToString())) return; if (!_CacheByPrimaryKey.ContainsKey(FolderID.ToString())) return;
List<FolderInfo> listFolderInfo = _CacheByPrimaryKey[FolderID.ToString()]; // Get the list of items List<FolderInfo> listFolderInfo = _CacheByPrimaryKey[FolderID.ToString()]; // Get the list of items

View File

@ -47,8 +47,28 @@ namespace VEPROMS.CSLA.Library
this.OnListChanged(new ListChangedEventArgs(ListChangedType.ItemChanged, i)); this.OnListChanged(new ListChangedEventArgs(ListChangedType.ItemChanged, i));
} }
} }
private bool _Disposed = false;
private static int _CountCreated = 0;
private static int _CountDisposed = 0;
private static int _CountFinalized = 0;
private static int IncrementCountCreated
{ get { return ++_CountCreated; } }
private int _CountWhenCreated = IncrementCountCreated;
public static int CountCreated
{ get { return _CountCreated; } }
public static int CountNotDisposed
{ get { return _CountCreated - _CountDisposed; } }
public static int CountNotFinalized
{ get { return _CountCreated - _CountFinalized; } }
~FolderInfoList()
{
_CountFinalized++;
}
public void Dispose() public void Dispose()
{ {
if (_Disposed) return;
_CountDisposed++;
_Disposed = true;
foreach (FolderInfo tmp in this) foreach (FolderInfo tmp in this)
{ {
tmp.Changed -= new FolderInfoEvent(tmp_Changed); tmp.Changed -= new FolderInfoEvent(tmp_Changed);

View File

@ -68,12 +68,16 @@ namespace VEPROMS.CSLA.Library
} }
} }
} }
private void BuildRefreshList() private void ClearRefreshList()
{ {
_RefreshFormats = new List<Format>(); _RefreshFormats = new List<Format>();
_RefreshFormatContents = new List<FormatContent>(); _RefreshFormatContents = new List<FormatContent>();
_RefreshFormatDocVersions = new List<FormatDocVersion>(); _RefreshFormatDocVersions = new List<FormatDocVersion>();
_RefreshFormatFolders = new List<FormatFolder>(); _RefreshFormatFolders = new List<FormatFolder>();
}
private void BuildRefreshList()
{
ClearRefreshList();
AddToRefreshList(_RefreshFormats, _RefreshFormatContents, _RefreshFormatDocVersions, _RefreshFormatFolders); AddToRefreshList(_RefreshFormats, _RefreshFormatContents, _RefreshFormatDocVersions, _RefreshFormatFolders);
} }
private void ProcessRefreshList() private void ProcessRefreshList()
@ -94,6 +98,7 @@ namespace VEPROMS.CSLA.Library
{ {
FolderInfo.Refresh(tmp); FolderInfo.Refresh(tmp);
} }
ClearRefreshList();
} }
#endregion #endregion
#region Collection #region Collection
@ -674,8 +679,28 @@ namespace VEPROMS.CSLA.Library
{/* require use of factory methods */ {/* require use of factory methods */
AddToCache(this); AddToCache(this);
} }
private bool _Disposed = false;
private static int _CountCreated = 0;
private static int _CountDisposed = 0;
private static int _CountFinalized = 0;
private static int IncrementCountCreated
{ get { return ++_CountCreated; } }
private int _CountWhenCreated = IncrementCountCreated;
public static int CountCreated
{ get { return _CountCreated; } }
public static int CountNotDisposed
{ get { return _CountCreated - _CountDisposed; } }
public static int CountNotFinalized
{ get { return _CountCreated - _CountFinalized; } }
~Format()
{
_CountFinalized++;
}
public void Dispose() public void Dispose()
{ {
if (_Disposed) return;
_CountDisposed++;
_Disposed = true;
RemoveFromDictionaries(); RemoveFromDictionaries();
} }
private void RemoveFromDictionaries() private void RemoveFromDictionaries()

View File

@ -25,7 +25,7 @@ namespace VEPROMS.CSLA.Library
/// </summary> /// </summary>
[Serializable()] [Serializable()]
[TypeConverter(typeof(FormatContentConverter))] [TypeConverter(typeof(FormatContentConverter))]
public partial class FormatContent : BusinessBase<FormatContent>, IVEHasBrokenRules public partial class FormatContent : BusinessBase<FormatContent>, IVEHasBrokenRules, IDisposable
{ {
#region Log4Net #region Log4Net
private static readonly log4net.ILog _MyLog = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); private static readonly log4net.ILog _MyLog = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
@ -361,6 +361,29 @@ namespace VEPROMS.CSLA.Library
MarkAsChild(); MarkAsChild();
Fetch(dr); Fetch(dr);
} }
private bool _Disposed = false;
private static int _CountCreated = 0;
private static int _CountDisposed = 0;
private static int _CountFinalized = 0;
private static int IncrementCountCreated
{ get { return ++_CountCreated; } }
private int _CountWhenCreated = IncrementCountCreated;
public static int CountCreated
{ get { return _CountCreated; } }
public static int CountNotDisposed
{ get { return _CountCreated - _CountDisposed; } }
public static int CountNotFinalized
{ get { return _CountCreated - _CountFinalized; } }
~FormatContent()
{
_CountFinalized++;
}
public void Dispose()
{
if (_Disposed) return;
_CountDisposed++;
_Disposed = true;
}
#endregion #endregion
#region Data Access Portal #region Data Access Portal
private void Fetch(SafeDataReader dr) private void Fetch(SafeDataReader dr)

View File

@ -25,7 +25,7 @@ namespace VEPROMS.CSLA.Library
/// </summary> /// </summary>
[Serializable()] [Serializable()]
[TypeConverter(typeof(FormatContentsConverter))] [TypeConverter(typeof(FormatContentsConverter))]
public partial class FormatContents : BusinessListBase<FormatContents, FormatContent>, ICustomTypeDescriptor, IVEHasBrokenRules public partial class FormatContents : BusinessListBase<FormatContents, FormatContent>, ICustomTypeDescriptor, IVEHasBrokenRules , IDisposable
{ {
#region Log4Net #region Log4Net
private static readonly log4net.ILog _MyLog = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); private static readonly log4net.ILog _MyLog = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
@ -170,6 +170,29 @@ namespace VEPROMS.CSLA.Library
MarkAsChild(); MarkAsChild();
Fetch(dr); Fetch(dr);
} }
private bool _Disposed = false;
private static int _CountCreated = 0;
private static int _CountDisposed = 0;
private static int _CountFinalized = 0;
private static int IncrementCountCreated
{ get { return ++_CountCreated; } }
private int _CountWhenCreated = IncrementCountCreated;
public static int CountCreated
{ get { return _CountCreated; } }
public static int CountNotDisposed
{ get { return _CountCreated - _CountDisposed; } }
public static int CountNotFinalized
{ get { return _CountCreated - _CountFinalized; } }
~FormatContents()
{
_CountFinalized++;
}
public void Dispose()
{
if (_Disposed) return;
_CountDisposed++;
_Disposed = true;
}
#endregion #endregion
#region Data Access Portal #region Data Access Portal
// called to load data from the database // called to load data from the database

View File

@ -25,7 +25,7 @@ namespace VEPROMS.CSLA.Library
/// </summary> /// </summary>
[Serializable()] [Serializable()]
[TypeConverter(typeof(FormatDocVersionConverter))] [TypeConverter(typeof(FormatDocVersionConverter))]
public partial class FormatDocVersion : BusinessBase<FormatDocVersion>, IVEHasBrokenRules public partial class FormatDocVersion : BusinessBase<FormatDocVersion>, IVEHasBrokenRules, IDisposable
{ {
#region Log4Net #region Log4Net
private static readonly log4net.ILog _MyLog = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); private static readonly log4net.ILog _MyLog = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
@ -566,6 +566,29 @@ namespace VEPROMS.CSLA.Library
MarkAsChild(); MarkAsChild();
Fetch(dr); Fetch(dr);
} }
private bool _Disposed = false;
private static int _CountCreated = 0;
private static int _CountDisposed = 0;
private static int _CountFinalized = 0;
private static int IncrementCountCreated
{ get { return ++_CountCreated; } }
private int _CountWhenCreated = IncrementCountCreated;
public static int CountCreated
{ get { return _CountCreated; } }
public static int CountNotDisposed
{ get { return _CountCreated - _CountDisposed; } }
public static int CountNotFinalized
{ get { return _CountCreated - _CountFinalized; } }
~FormatDocVersion()
{
_CountFinalized++;
}
public void Dispose()
{
if (_Disposed) return;
_CountDisposed++;
_Disposed = true;
}
#endregion #endregion
#region Data Access Portal #region Data Access Portal
private void Fetch(SafeDataReader dr) private void Fetch(SafeDataReader dr)

View File

@ -25,7 +25,7 @@ namespace VEPROMS.CSLA.Library
/// </summary> /// </summary>
[Serializable()] [Serializable()]
[TypeConverter(typeof(FormatDocVersionsConverter))] [TypeConverter(typeof(FormatDocVersionsConverter))]
public partial class FormatDocVersions : BusinessListBase<FormatDocVersions, FormatDocVersion>, ICustomTypeDescriptor, IVEHasBrokenRules public partial class FormatDocVersions : BusinessListBase<FormatDocVersions, FormatDocVersion>, ICustomTypeDescriptor, IVEHasBrokenRules , IDisposable
{ {
#region Log4Net #region Log4Net
private static readonly log4net.ILog _MyLog = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); private static readonly log4net.ILog _MyLog = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
@ -170,6 +170,29 @@ namespace VEPROMS.CSLA.Library
MarkAsChild(); MarkAsChild();
Fetch(dr); Fetch(dr);
} }
private bool _Disposed = false;
private static int _CountCreated = 0;
private static int _CountDisposed = 0;
private static int _CountFinalized = 0;
private static int IncrementCountCreated
{ get { return ++_CountCreated; } }
private int _CountWhenCreated = IncrementCountCreated;
public static int CountCreated
{ get { return _CountCreated; } }
public static int CountNotDisposed
{ get { return _CountCreated - _CountDisposed; } }
public static int CountNotFinalized
{ get { return _CountCreated - _CountFinalized; } }
~FormatDocVersions()
{
_CountFinalized++;
}
public void Dispose()
{
if (_Disposed) return;
_CountDisposed++;
_Disposed = true;
}
#endregion #endregion
#region Data Access Portal #region Data Access Portal
// called to load data from the database // called to load data from the database

View File

@ -25,7 +25,7 @@ namespace VEPROMS.CSLA.Library
/// </summary> /// </summary>
[Serializable()] [Serializable()]
[TypeConverter(typeof(FormatFolderConverter))] [TypeConverter(typeof(FormatFolderConverter))]
public partial class FormatFolder : BusinessBase<FormatFolder>, IVEHasBrokenRules public partial class FormatFolder : BusinessBase<FormatFolder>, IVEHasBrokenRules, IDisposable
{ {
#region Log4Net #region Log4Net
private static readonly log4net.ILog _MyLog = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); private static readonly log4net.ILog _MyLog = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
@ -577,6 +577,29 @@ namespace VEPROMS.CSLA.Library
MarkAsChild(); MarkAsChild();
Fetch(dr); Fetch(dr);
} }
private bool _Disposed = false;
private static int _CountCreated = 0;
private static int _CountDisposed = 0;
private static int _CountFinalized = 0;
private static int IncrementCountCreated
{ get { return ++_CountCreated; } }
private int _CountWhenCreated = IncrementCountCreated;
public static int CountCreated
{ get { return _CountCreated; } }
public static int CountNotDisposed
{ get { return _CountCreated - _CountDisposed; } }
public static int CountNotFinalized
{ get { return _CountCreated - _CountFinalized; } }
~FormatFolder()
{
_CountFinalized++;
}
public void Dispose()
{
if (_Disposed) return;
_CountDisposed++;
_Disposed = true;
}
#endregion #endregion
#region Data Access Portal #region Data Access Portal
private void Fetch(SafeDataReader dr) private void Fetch(SafeDataReader dr)

View File

@ -25,7 +25,7 @@ namespace VEPROMS.CSLA.Library
/// </summary> /// </summary>
[Serializable()] [Serializable()]
[TypeConverter(typeof(FormatFoldersConverter))] [TypeConverter(typeof(FormatFoldersConverter))]
public partial class FormatFolders : BusinessListBase<FormatFolders, FormatFolder>, ICustomTypeDescriptor, IVEHasBrokenRules public partial class FormatFolders : BusinessListBase<FormatFolders, FormatFolder>, ICustomTypeDescriptor, IVEHasBrokenRules , IDisposable
{ {
#region Log4Net #region Log4Net
private static readonly log4net.ILog _MyLog = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); private static readonly log4net.ILog _MyLog = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
@ -170,6 +170,29 @@ namespace VEPROMS.CSLA.Library
MarkAsChild(); MarkAsChild();
Fetch(dr); Fetch(dr);
} }
private bool _Disposed = false;
private static int _CountCreated = 0;
private static int _CountDisposed = 0;
private static int _CountFinalized = 0;
private static int IncrementCountCreated
{ get { return ++_CountCreated; } }
private int _CountWhenCreated = IncrementCountCreated;
public static int CountCreated
{ get { return _CountCreated; } }
public static int CountNotDisposed
{ get { return _CountCreated - _CountDisposed; } }
public static int CountNotFinalized
{ get { return _CountCreated - _CountFinalized; } }
~FormatFolders()
{
_CountFinalized++;
}
public void Dispose()
{
if (_Disposed) return;
_CountDisposed++;
_Disposed = true;
}
#endregion #endregion
#region Data Access Portal #region Data Access Portal
// called to load data from the database // called to load data from the database

View File

@ -364,8 +364,28 @@ namespace VEPROMS.CSLA.Library
{/* require use of factory methods */ {/* require use of factory methods */
AddToCache(this); AddToCache(this);
} }
private bool _Disposed = false;
private static int _CountCreated = 0;
private static int _CountDisposed = 0;
private static int _CountFinalized = 0;
private static int IncrementCountCreated
{ get { return ++_CountCreated; } }
private int _CountWhenCreated = IncrementCountCreated;
public static int CountCreated
{ get { return _CountCreated; } }
public static int CountNotDisposed
{ get { return _CountCreated - _CountDisposed; } }
public static int CountNotFinalized
{ get { return _CountCreated - _CountFinalized; } }
~FormatInfo()
{
_CountFinalized++;
}
public void Dispose() public void Dispose()
{ {
if (_Disposed) return;
_CountDisposed++;
_Disposed = true;
RemoveFromCache(this); RemoveFromCache(this);
if (!_CacheByPrimaryKey.ContainsKey(FormatID.ToString())) return; if (!_CacheByPrimaryKey.ContainsKey(FormatID.ToString())) return;
List<FormatInfo> listFormatInfo = _CacheByPrimaryKey[FormatID.ToString()]; // Get the list of items List<FormatInfo> listFormatInfo = _CacheByPrimaryKey[FormatID.ToString()]; // Get the list of items

View File

@ -47,8 +47,28 @@ namespace VEPROMS.CSLA.Library
this.OnListChanged(new ListChangedEventArgs(ListChangedType.ItemChanged, i)); this.OnListChanged(new ListChangedEventArgs(ListChangedType.ItemChanged, i));
} }
} }
private bool _Disposed = false;
private static int _CountCreated = 0;
private static int _CountDisposed = 0;
private static int _CountFinalized = 0;
private static int IncrementCountCreated
{ get { return ++_CountCreated; } }
private int _CountWhenCreated = IncrementCountCreated;
public static int CountCreated
{ get { return _CountCreated; } }
public static int CountNotDisposed
{ get { return _CountCreated - _CountDisposed; } }
public static int CountNotFinalized
{ get { return _CountCreated - _CountFinalized; } }
~FormatInfoList()
{
_CountFinalized++;
}
public void Dispose() public void Dispose()
{ {
if (_Disposed) return;
_CountDisposed++;
_Disposed = true;
foreach (FormatInfo tmp in this) foreach (FormatInfo tmp in this)
{ {
tmp.Changed -= new FormatInfoEvent(tmp_Changed); tmp.Changed -= new FormatInfoEvent(tmp_Changed);

View File

@ -37,9 +37,13 @@ namespace VEPROMS.CSLA.Library
if (IsDirty) if (IsDirty)
refreshGrids.Add(this); refreshGrids.Add(this);
} }
private void BuildRefreshList() private void ClearRefreshList()
{ {
_RefreshGrids = new List<Grid>(); _RefreshGrids = new List<Grid>();
}
private void BuildRefreshList()
{
ClearRefreshList();
AddToRefreshList(_RefreshGrids); AddToRefreshList(_RefreshGrids);
} }
private void ProcessRefreshList() private void ProcessRefreshList()
@ -48,6 +52,7 @@ namespace VEPROMS.CSLA.Library
{ {
GridInfo.Refresh(tmp); GridInfo.Refresh(tmp);
} }
ClearRefreshList();
} }
#endregion #endregion
#region Collection #region Collection
@ -358,8 +363,28 @@ namespace VEPROMS.CSLA.Library
{/* require use of factory methods */ {/* require use of factory methods */
AddToCache(this); AddToCache(this);
} }
private bool _Disposed = false;
private static int _CountCreated = 0;
private static int _CountDisposed = 0;
private static int _CountFinalized = 0;
private static int IncrementCountCreated
{ get { return ++_CountCreated; } }
private int _CountWhenCreated = IncrementCountCreated;
public static int CountCreated
{ get { return _CountCreated; } }
public static int CountNotDisposed
{ get { return _CountCreated - _CountDisposed; } }
public static int CountNotFinalized
{ get { return _CountCreated - _CountFinalized; } }
~Grid()
{
_CountFinalized++;
}
public void Dispose() public void Dispose()
{ {
if (_Disposed) return;
_CountDisposed++;
_Disposed = true;
RemoveFromDictionaries(); RemoveFromDictionaries();
} }
private void RemoveFromDictionaries() private void RemoveFromDictionaries()

View File

@ -37,9 +37,13 @@ namespace VEPROMS.CSLA.Library
if (IsDirty) if (IsDirty)
refreshGridAudits.Add(this); refreshGridAudits.Add(this);
} }
private void BuildRefreshList() private void ClearRefreshList()
{ {
_RefreshGridAudits = new List<GridAudit>(); _RefreshGridAudits = new List<GridAudit>();
}
private void BuildRefreshList()
{
ClearRefreshList();
AddToRefreshList(_RefreshGridAudits); AddToRefreshList(_RefreshGridAudits);
} }
private void ProcessRefreshList() private void ProcessRefreshList()
@ -48,6 +52,7 @@ namespace VEPROMS.CSLA.Library
{ {
GridAuditInfo.Refresh(tmp); GridAuditInfo.Refresh(tmp);
} }
ClearRefreshList();
} }
#endregion #endregion
#region Collection #region Collection
@ -415,8 +420,28 @@ namespace VEPROMS.CSLA.Library
{/* require use of factory methods */ {/* require use of factory methods */
AddToCache(this); AddToCache(this);
} }
private bool _Disposed = false;
private static int _CountCreated = 0;
private static int _CountDisposed = 0;
private static int _CountFinalized = 0;
private static int IncrementCountCreated
{ get { return ++_CountCreated; } }
private int _CountWhenCreated = IncrementCountCreated;
public static int CountCreated
{ get { return _CountCreated; } }
public static int CountNotDisposed
{ get { return _CountCreated - _CountDisposed; } }
public static int CountNotFinalized
{ get { return _CountCreated - _CountFinalized; } }
~GridAudit()
{
_CountFinalized++;
}
public void Dispose() public void Dispose()
{ {
if (_Disposed) return;
_CountDisposed++;
_Disposed = true;
RemoveFromDictionaries(); RemoveFromDictionaries();
} }
private void RemoveFromDictionaries() private void RemoveFromDictionaries()

View File

@ -200,8 +200,28 @@ namespace VEPROMS.CSLA.Library
{/* require use of factory methods */ {/* require use of factory methods */
AddToCache(this); AddToCache(this);
} }
private bool _Disposed = false;
private static int _CountCreated = 0;
private static int _CountDisposed = 0;
private static int _CountFinalized = 0;
private static int IncrementCountCreated
{ get { return ++_CountCreated; } }
private int _CountWhenCreated = IncrementCountCreated;
public static int CountCreated
{ get { return _CountCreated; } }
public static int CountNotDisposed
{ get { return _CountCreated - _CountDisposed; } }
public static int CountNotFinalized
{ get { return _CountCreated - _CountFinalized; } }
~GridAuditInfo()
{
_CountFinalized++;
}
public void Dispose() public void Dispose()
{ {
if (_Disposed) return;
_CountDisposed++;
_Disposed = true;
RemoveFromCache(this); RemoveFromCache(this);
if (!_CacheByPrimaryKey.ContainsKey(AuditID.ToString())) return; if (!_CacheByPrimaryKey.ContainsKey(AuditID.ToString())) return;
List<GridAuditInfo> listGridAuditInfo = _CacheByPrimaryKey[AuditID.ToString()]; // Get the list of items List<GridAuditInfo> listGridAuditInfo = _CacheByPrimaryKey[AuditID.ToString()]; // Get the list of items

View File

@ -47,8 +47,28 @@ namespace VEPROMS.CSLA.Library
this.OnListChanged(new ListChangedEventArgs(ListChangedType.ItemChanged, i)); this.OnListChanged(new ListChangedEventArgs(ListChangedType.ItemChanged, i));
} }
} }
private bool _Disposed = false;
private static int _CountCreated = 0;
private static int _CountDisposed = 0;
private static int _CountFinalized = 0;
private static int IncrementCountCreated
{ get { return ++_CountCreated; } }
private int _CountWhenCreated = IncrementCountCreated;
public static int CountCreated
{ get { return _CountCreated; } }
public static int CountNotDisposed
{ get { return _CountCreated - _CountDisposed; } }
public static int CountNotFinalized
{ get { return _CountCreated - _CountFinalized; } }
~GridAuditInfoList()
{
_CountFinalized++;
}
public void Dispose() public void Dispose()
{ {
if (_Disposed) return;
_CountDisposed++;
_Disposed = true;
foreach (GridAuditInfo tmp in this) foreach (GridAuditInfo tmp in this)
{ {
tmp.Changed -= new GridAuditInfoEvent(tmp_Changed); tmp.Changed -= new GridAuditInfoEvent(tmp_Changed);

View File

@ -179,8 +179,28 @@ namespace VEPROMS.CSLA.Library
{/* require use of factory methods */ {/* require use of factory methods */
AddToCache(this); AddToCache(this);
} }
private bool _Disposed = false;
private static int _CountCreated = 0;
private static int _CountDisposed = 0;
private static int _CountFinalized = 0;
private static int IncrementCountCreated
{ get { return ++_CountCreated; } }
private int _CountWhenCreated = IncrementCountCreated;
public static int CountCreated
{ get { return _CountCreated; } }
public static int CountNotDisposed
{ get { return _CountCreated - _CountDisposed; } }
public static int CountNotFinalized
{ get { return _CountCreated - _CountFinalized; } }
~GridInfo()
{
_CountFinalized++;
}
public void Dispose() public void Dispose()
{ {
if (_Disposed) return;
_CountDisposed++;
_Disposed = true;
RemoveFromCache(this); RemoveFromCache(this);
if (!_CacheByPrimaryKey.ContainsKey(ContentID.ToString())) return; if (!_CacheByPrimaryKey.ContainsKey(ContentID.ToString())) return;
List<GridInfo> listGridInfo = _CacheByPrimaryKey[ContentID.ToString()]; // Get the list of items List<GridInfo> listGridInfo = _CacheByPrimaryKey[ContentID.ToString()]; // Get the list of items

View File

@ -53,11 +53,15 @@ namespace VEPROMS.CSLA.Library
} }
} }
} }
private void BuildRefreshList() private void ClearRefreshList()
{ {
_RefreshGroups = new List<Group>(); _RefreshGroups = new List<Group>();
_RefreshGroupAssignments = new List<GroupAssignment>(); _RefreshGroupAssignments = new List<GroupAssignment>();
_RefreshGroupMemberships = new List<GroupMembership>(); _RefreshGroupMemberships = new List<GroupMembership>();
}
private void BuildRefreshList()
{
ClearRefreshList();
AddToRefreshList(_RefreshGroups, _RefreshGroupAssignments, _RefreshGroupMemberships); AddToRefreshList(_RefreshGroups, _RefreshGroupAssignments, _RefreshGroupMemberships);
} }
private void ProcessRefreshList() private void ProcessRefreshList()
@ -74,6 +78,7 @@ namespace VEPROMS.CSLA.Library
{ {
MembershipInfo.Refresh(tmp); MembershipInfo.Refresh(tmp);
} }
ClearRefreshList();
} }
#endregion #endregion
#region Collection #region Collection
@ -509,8 +514,28 @@ namespace VEPROMS.CSLA.Library
{/* require use of factory methods */ {/* require use of factory methods */
AddToCache(this); AddToCache(this);
} }
private bool _Disposed = false;
private static int _CountCreated = 0;
private static int _CountDisposed = 0;
private static int _CountFinalized = 0;
private static int IncrementCountCreated
{ get { return ++_CountCreated; } }
private int _CountWhenCreated = IncrementCountCreated;
public static int CountCreated
{ get { return _CountCreated; } }
public static int CountNotDisposed
{ get { return _CountCreated - _CountDisposed; } }
public static int CountNotFinalized
{ get { return _CountCreated - _CountFinalized; } }
~Group()
{
_CountFinalized++;
}
public void Dispose() public void Dispose()
{ {
if (_Disposed) return;
_CountDisposed++;
_Disposed = true;
RemoveFromDictionaries(); RemoveFromDictionaries();
} }
private void RemoveFromDictionaries() private void RemoveFromDictionaries()

View File

@ -25,7 +25,7 @@ namespace VEPROMS.CSLA.Library
/// </summary> /// </summary>
[Serializable()] [Serializable()]
[TypeConverter(typeof(GroupAssignmentConverter))] [TypeConverter(typeof(GroupAssignmentConverter))]
public partial class GroupAssignment : BusinessBase<GroupAssignment>, IVEHasBrokenRules public partial class GroupAssignment : BusinessBase<GroupAssignment>, IVEHasBrokenRules, IDisposable
{ {
#region Log4Net #region Log4Net
private static readonly log4net.ILog _MyLog = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); private static readonly log4net.ILog _MyLog = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
@ -605,6 +605,29 @@ namespace VEPROMS.CSLA.Library
MarkAsChild(); MarkAsChild();
Fetch(dr); Fetch(dr);
} }
private bool _Disposed = false;
private static int _CountCreated = 0;
private static int _CountDisposed = 0;
private static int _CountFinalized = 0;
private static int IncrementCountCreated
{ get { return ++_CountCreated; } }
private int _CountWhenCreated = IncrementCountCreated;
public static int CountCreated
{ get { return _CountCreated; } }
public static int CountNotDisposed
{ get { return _CountCreated - _CountDisposed; } }
public static int CountNotFinalized
{ get { return _CountCreated - _CountFinalized; } }
~GroupAssignment()
{
_CountFinalized++;
}
public void Dispose()
{
if (_Disposed) return;
_CountDisposed++;
_Disposed = true;
}
#endregion #endregion
#region Data Access Portal #region Data Access Portal
private void Fetch(SafeDataReader dr) private void Fetch(SafeDataReader dr)

View File

@ -25,7 +25,7 @@ namespace VEPROMS.CSLA.Library
/// </summary> /// </summary>
[Serializable()] [Serializable()]
[TypeConverter(typeof(GroupAssignmentsConverter))] [TypeConverter(typeof(GroupAssignmentsConverter))]
public partial class GroupAssignments : BusinessListBase<GroupAssignments, GroupAssignment>, ICustomTypeDescriptor, IVEHasBrokenRules public partial class GroupAssignments : BusinessListBase<GroupAssignments, GroupAssignment>, ICustomTypeDescriptor, IVEHasBrokenRules , IDisposable
{ {
#region Log4Net #region Log4Net
private static readonly log4net.ILog _MyLog = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); private static readonly log4net.ILog _MyLog = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
@ -170,6 +170,29 @@ namespace VEPROMS.CSLA.Library
MarkAsChild(); MarkAsChild();
Fetch(dr); Fetch(dr);
} }
private bool _Disposed = false;
private static int _CountCreated = 0;
private static int _CountDisposed = 0;
private static int _CountFinalized = 0;
private static int IncrementCountCreated
{ get { return ++_CountCreated; } }
private int _CountWhenCreated = IncrementCountCreated;
public static int CountCreated
{ get { return _CountCreated; } }
public static int CountNotDisposed
{ get { return _CountCreated - _CountDisposed; } }
public static int CountNotFinalized
{ get { return _CountCreated - _CountFinalized; } }
~GroupAssignments()
{
_CountFinalized++;
}
public void Dispose()
{
if (_Disposed) return;
_CountDisposed++;
_Disposed = true;
}
#endregion #endregion
#region Data Access Portal #region Data Access Portal
// called to load data from the database // called to load data from the database

View File

@ -256,8 +256,28 @@ namespace VEPROMS.CSLA.Library
{/* require use of factory methods */ {/* require use of factory methods */
AddToCache(this); AddToCache(this);
} }
private bool _Disposed = false;
private static int _CountCreated = 0;
private static int _CountDisposed = 0;
private static int _CountFinalized = 0;
private static int IncrementCountCreated
{ get { return ++_CountCreated; } }
private int _CountWhenCreated = IncrementCountCreated;
public static int CountCreated
{ get { return _CountCreated; } }
public static int CountNotDisposed
{ get { return _CountCreated - _CountDisposed; } }
public static int CountNotFinalized
{ get { return _CountCreated - _CountFinalized; } }
~GroupInfo()
{
_CountFinalized++;
}
public void Dispose() public void Dispose()
{ {
if (_Disposed) return;
_CountDisposed++;
_Disposed = true;
RemoveFromCache(this); RemoveFromCache(this);
if (!_CacheByPrimaryKey.ContainsKey(GID.ToString())) return; if (!_CacheByPrimaryKey.ContainsKey(GID.ToString())) return;
List<GroupInfo> listGroupInfo = _CacheByPrimaryKey[GID.ToString()]; // Get the list of items List<GroupInfo> listGroupInfo = _CacheByPrimaryKey[GID.ToString()]; // Get the list of items

Some files were not shown because too many files have changed in this diff Show More