When my private backing field SetProperty is called...even though it is ByRef, the value in mDTO.EvidNum does not change until AFTER the PropertyHasChanged runs.
This means that a simple rule like StringRequired runs and sees an empty string and the rule stays broken. But the next step after rules running is that the mDTO.EvidNum property setter is called. So you look at the business object and the rule is broken but there is a value there.
Any ideas? I assume the CSLA code assumes a private backing field is just a string not a Class.StringProperty.
I have the following code:
PrivateShared EvidNumPropertyInfo AsPropertyInfo(OfString) = RegisterProperty(OfString)(Function(c) c.EvidNum, RelationshipTypes.PrivateField)
PublicProperty EvidNum() AsString
Get
Return GetProperty(EvidNumPropertyInfo, mDTO.EvidNum)
EndGet
Set(ByVal value As String)
SetProperty(EvidNumPropertyInfo, mDTO.EvidNum, value)
EndSet
Normal 0 false false false EN-US JA X-NONE
EndProperty