> The fiirst issue, that surfaced itself in this bug report is IMHO wrong > assumption that DP takes about types implementing ISerializable. > An implicit contract exists that types implementing ISerializable must also > have a specific constructor. DP checks for existence of this constructor, > and in case this constructor is not present, it throws. > The thing is, this constructor is not required for type to be perfectly fine > serializable. Instead a IObjectReference interface can be used to delegate > serialization/deserialization responsibilities to. In fact, this is how > interface proxies are deserialized in DP, though they do not have the > constructor.
As I just wrote on the other thread, as I didn't see this message, DP also uses object references (for all proxies, not only interface proxies), so supporting classes using their own IObjectReference wouldn't be that easy. > The other issue is proxying proxy types specifically. I for example wanted > to stub a stub type with Rhino.Mock in one test. > If we wanted to enable this, we would have to change the way proxy fields > are stored in/retrieved from SerializationInfo object, since currently inner > type will try to add values under the same key as outer type, which will > result in exception. > > The question remains however, if this corner case is worth pursuing. I'm not sure as well - would you really need to serialize proxies of proxies? Or, in your case, serialize a stubbed stub? We could solve this by nesting the SerializationInfos in some way, although I'm not sure whether this is possible. Can you put a SerializationInfo into a SerializationInfo? Probably not. You can't even check whether a key already exists, can you? Fabian --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Castle Project Development List" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/castle-project-devel?hl=en -~----------~----~----~----~------~----~------~--~---
