added delegate for event to update the annotation list

This commit is contained in:
John Jenko 2012-03-16 15:49:44 +00:00
parent 12eaf94c09
commit 071d1a189c

View File

@ -19,6 +19,7 @@ using System.ComponentModel;
using System.Collections.Generic; using System.Collections.Generic;
namespace VEPROMS.CSLA.Library namespace VEPROMS.CSLA.Library
{ {
public delegate void AnnotationTypeInfoListEvent();
/// <summary> /// <summary>
/// AnnotationTypeInfoList Generated by MyGeneration using the CSLA Object Mapping template /// AnnotationTypeInfoList Generated by MyGeneration using the CSLA Object Mapping template
/// </summary> /// </summary>
@ -26,6 +27,12 @@ namespace VEPROMS.CSLA.Library
[TypeConverter(typeof(AnnotationTypeInfoListConverter))] [TypeConverter(typeof(AnnotationTypeInfoListConverter))]
public partial class AnnotationTypeInfoList : ReadOnlyListBase<AnnotationTypeInfoList, AnnotationTypeInfo>, ICustomTypeDescriptor, IDisposable public partial class AnnotationTypeInfoList : ReadOnlyListBase<AnnotationTypeInfoList, AnnotationTypeInfo>, ICustomTypeDescriptor, IDisposable
{ {
public static event AnnotationTypeInfoListEvent ListChanged;
private static void OnListChanged()
{
if (ListChanged != null)
ListChanged();
}
#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);
#endregion #endregion
@ -70,6 +77,7 @@ namespace VEPROMS.CSLA.Library
AnnotationTypeInfo.AddList(tmp); AnnotationTypeInfo.AddList(tmp);
tmp.AddEvents(); tmp.AddEvents();
_AnnotationTypeInfoList = tmp; _AnnotationTypeInfoList = tmp;
OnListChanged();
return tmp; return tmp;
} }
catch (Exception ex) catch (Exception ex)