Sorry for the delay - I didn't spot this until just now...

The key thing (for protobuf-net) is that there are matching contracts
at each end. They don't have to be the same types, but they must be
compatible. If you are using xml serialization markers, then it uses
the XmlElement.Order property as the tag for protobuf-net.

If is entirely possible that your serialization process doesn't emit
tags with an Order, in which case you can either:

 - edit the generated code (yeuch) to attach a [ProtoMember(...)]
attribute
 - add a partial class to declare the attributes

In particular, you can use (for example):

        [ProtoContract]
        [ProtoPartialMember(1, "Foo")]
        [ProtoPartialMember(2, "Bar")]
        [ProtoPartialIgnore("SomethingToIgnore")]
        partial class YourType { }

Not as nice as decorating properties directly, but it should at least
work.

The other option is to generate both the client and server code
(perhaps via ProtoGen) to be compatible, but ultimately protobuf-net
works at runtime, not as a compile tool.

If you can give more context to the nature of the classes (at client
and/or server) I can probably advise more. Either here or at
marc.grav...@gmail.com

I'm off to set summary e-mails to send immediately, rather than
daily...

Marc Gravell
[protobuf-net]
        {



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To post to this group, send email to protobuf@googlegroups.com
To unsubscribe from this group, send email to 
protobuf+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/protobuf?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to