Nonserialized Dependencies Not Resolved Client Side

Nov 19, 2014 at 11:16 PM
I've been playing around with your DI example from CSLA, and I have possibly found an issue. Where in your code are you resolving business object dependencies client side when the dependency is marked as Nonserializable? All business objects correctly resolve dependencies server side via the IDataPortalActivator implementation, but when that object returns client side it would need to re-resolve the nonserializable dependencies that were lost during serialization.

I've implement DI with CSLA at my company using the method provided on Peter Stromquist's blog:

Here we create a businessbase class that overrides the OnDeserialized method to solve the problem I mentioned above.

I was interested in your solution, implementing a IDataPortalActivator because it just feels more right not having to create a base class for injection only :). Would I have to handle this client side wire up in a custom DataPortalProxy?