I'm working on a SL4 project and dataportal. My CommandBase has one property, a list of a custom class. I set the value in the BeginExec factory method but in the DataPortal_Execute() code the value is null. It is like the data isn't making over the dataportal. I've flagged it with a Csla.Serializable attribute. Is there anything else I need to do to get the value across?
Okay. I figured out that the properties must be managed properties. However the contract serializer explodes when it hits my custom type. Is there anything I can do about it?
Your CustomType must implement IMobileObject.
That makes sense. I'll give it a try. Thanks!
You will find it best to inherit from one of the pre-existing CSLA base types. Even if you don't need the top-level steroetype support from BB or ROB, you should look at the MobileXYZ types in Csla.Core - like MobileObject.
In short, you really don't want to implement IMobileObject yourself if you can avoid it, and we already provide some basic implementations that might meet your requirements.
That worked! I had to change my List<CustomType> to a Csla.Core.MobileList<CustomType>. Is that normal?
The MobileFormatter can only serialize types that implement IMobileObject - that includes the entire object graph, so lists, objects, dictionaries, you name it.
That makes sense. Thanks!
Copyright (c) Marimer LLC