Skip to content
Discussion options

You must be logged in to vote

A solution for CSLA 6 is to remember that everything is serialized via MobileFormatter, which means that all the base types ultimately implement IMobileObject - including BusinessListBase.

So you can override the get/set methods for field values:

    protected override void OnGetState(SerializationInfo info)
    {
      base.OnGetState(info);
    }

    protected override void OnSetState(SerializationInfo info)
    {
      base.OnSetState(info);
    }

Then you can get/set your property or field value(s) as necessary in the serialization stream and they'll flow through cloning and the data portal.

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
3 replies
@michaelcsikos
Comment options

michaelcsikos Apr 26, 2022
Collaborator Author

@rockfordlhotka
Comment options

@michaelcsikos
Comment options

michaelcsikos Apr 26, 2022
Collaborator Author

Comment options

You must be logged in to vote
1 reply
@michaelcsikos
Comment options

michaelcsikos Apr 26, 2022
Collaborator Author

Answer selected by michaelcsikos
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants