Streaming objects with no parameterless constructor -
11-08-2006
, 12:37 PM
I have a class which has a constructor with a mandatory parameter
"ObjectSpace". This parameter is important because the class itself is
merely a facade onto a data cache.
If I want to send this class via remoting as serialised XML thats fine, but
if I want to receive the values back from the client I wont be able to
deserialise it due to there being no parameterless constructor will I? Is
there a way that I can hook into the deserialise process or something so
that I may create the object instance myself (as I know what to pass as a
parameter to the constructor) and then let the normal deserialisation
process set the property values?
Thanks
Pete |