Serializing Collection Properties

Serializing Collection Properties

Old forum URL:

jh72i posted on Wednesday, October 19, 2011

Just wondering if there is a reason why there isn't an inbuilt mechanism in Csla to serialize and deserialized collection/list based properties like there is for the business objects - i.e. why do i have to override OnGetState/OnSetState and use some horrible "string" based coding style. Seems like a step backward?

info.AddValue("Csla.BusinessListBase._isChild", _isChild);

StefanCop replied on Wednesday, October 19, 2011

I think it is because of SL, where it's only possible to use reflection in public members. 

But if you use Csla.Core.MobileList / MobileBindingList / MobileObservableCollection etc.  instead of there .NET base class you havn't to add some of these "horrible code" yourself. But you get the MobileFormatter, which works on all platforms, as far as I know.


jh72i replied on Wednesday, October 19, 2011

Thanks again Stefan for both of your replies today.

Copyright (c) Marimer LLC