But the remaining components of auditing have not yet been released in regards to field selection, etc.
Public Class MyBaseBO Inherits MicroFour.StrataFrame.Business.BusinessLayer
#Region " Constructors "
<System.Diagnostics.DebuggerNonUserCodeAttribute()> _ Public Sub New() MyBase.New() End Sub
<System.Diagnostics.DebuggerNonUserCodeAttribute()> _ Public Sub New(ByVal Container As System.ComponentModel.IContainer) MyBase.New()
'-- Add self to the specified container Container.Add(Me) End Sub
Protected Sub New(ByVal info As SerializationInfo, ByVal context As StreamingContext) MyBase.New(info, context) End Sub
#End Region
End Class
Double check your base BO to make sure that you have at least the constructors and are not calling anything that could cause a problem as design-time, and that you do not have a partial class with other properties, for example, that are getting in the way. If you were to create this class above, and then inherit from it, you will not get the error you are describing. I am not sure exactly how you are producing the error, but it will be along these lines.
I have a Base BO which inherits from Business layer
Then a Inherited BO this inherits from Base BO
All business object then inherit from Inherited Bo
I have a further thought, that may provide what you want. If you were to cearte another constructor in your base class something like
Public Sub New (ByVal FieldList() As String)MyBase.New() ' to call the Strataframe constructorIf Me.AuditUserChanges And Me.AuditedFields.Count = 0 Then For Each field As String In FieldList Dim AuditField As New RequiredField() AuditField.FieldType = Me.FieldDbTypes(field) AuditField.FieldName = field AuditedFields.Add(AuditField) NextEnd IfEnd Sub
Then in your end class your constructor(s) would look something like
Public Sub New (...)MyBase.New(Me.AllFieldsList.ToArray) ' calling the base constructor...
Hope this is more helpful
Peter
But in regards to your problem, this sounds like an issue within inheritance and maybe where you are placing your logic. The AllFieldsList gets created in the partial class through the BO Mapper. So that is where that error is coming from. Past that I guess I don't know if there is anything else you were wanting to know or if I missed something. Let me know.
Trent/Ben, can either of you shed some light on the proper way to do what I'm trying to accomplish?? Thanks!