I have CSLAGEN set to csla35 , VB and managedbackingfield property
mode. Then i create an editable root object (ER) with a child
collection property set to an editable child collection(ECC). The
resulting property of the ER concerning the ECC comes out to be
managed, not having a managedbackingfield, and the setter part seems
to be standard, rather than the expected.
Set (value As ECC)
MyECC = value
End Set
that one should be sth like that
Set (value As ECC)
SetProperty(MyECCProperty, value)
End Set
I modified the template to give the desired result although i didnt
fix the backingfield issue yet.(since it works i dont mind :))
line 126 BusinessProps.inc
<% If Info.ObjectType <> CslaObjectType.ReadOnlyObject AndAlso
prop.ReadOnly = False Then %>
<% If _child.ObjectType = CslaObjectType.editablechildcollection or
_child.ObjectType = CslaObjectType.editablechild Then %>
Set (byval value As <%=prop.TypeName%>)
SetProperty(<%=FormatManaged(prop.Name)%>, value)
End Set
<% else %>
Set (value As <%=prop.TypeName%>)
<%=FormatFieldName(prop.Name)%> = value
End Set
<% End If %>
<% End If %>
Managedbackingfield properties are a bit faster than simple managed
properties right? Thats the main reason i am using these and
discussing the matter.
Another questions is why do state fields come out protected and not
private?