I've encountered problems when testing the protogen classes with standard
WCF soap/xml serialization. Basically, repeated objects fail to work on
the server-side because the constructor is not called. Therefore the
List<T> is not constructed. Since the repeated properties only have
getters and not setters it fails badly.
Normally I'd prefer an explicit initializer but that would require
rewriting the xslt which is mildly painful. Instead I use reflection to
invoke the standard constructor.
public CTor() { this.Initialize(); }
private void Initialize() { .... Do required initialization ... }
[OnDeserializing]
void OnDeserialization() { StreamingContext ctx ) { this.Initialize(); }
I suppose this code could be moved to a separate partial file but its
annoying to do so for every class that needs it.
Original issue reported on code.google.com by abbott.t...@gmail.com on 18 Mar 2009 at 4:19
Original issue reported on code.google.com by
abbott.t...@gmail.com
on 18 Mar 2009 at 4:19Attachments: