In standard use, protouf-net is fully contract based and doesn't care what 
*types* are involved; this only matters if you are using the DynamicType option 
(which is outside the core protobuf stuff). If the types aren't stable, there 
is an event on the TypeModel that can be used to map in both directions between 
strings/Types - the default is to use AssemblyQualifiedName, but you can use 
anything you like as long as you can provide a robust map between strings and 
types.

Does that help?

On 11 Oct 2011, at 09:38, Lex <[email protected]> wrote:

> Hi,
> 
> We have recently started using protobuf-net for some serialization
> tasks that we have.  Our particular problem is that our serialized
> objects can live for possibly weeks at a time before we need to de-
> serialize them.  In the mean time we may need to re-factor some of the
> namespaces of the nested objects in the serialized objects.
> 
> After a bout of re-factoring I ran the de-serialization and got a
> 'Null reference' exception message.  With no more information to work
> with I had to check the source code out and debug it to find the
> offended code.  Once found I attached a handler to
> TypeModel.DynamicTypeFormatting to fix our issue which works very
> nicely.
> 
> However I feel it would be very nice if we could have a better
> exception message output so it could tell me what string it was trying
> to get a type for a failed.  Maybe checking the result of the call to
> model.DeserializeType in ProtoReader.DeserializeType for null and
> throwing an exception that outputs the Assembly name so that we know
> what it failed to find a type for.
> 
> For your consideration,
> 
> Lex
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Protocol Buffers" 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/protobuf?hl=en.
> 

-- 
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" 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/protobuf?hl=en.

Reply via email to