I try to use protobuf-net in WCF/Silverlight application to improve large objects array serialization performance. I can serialize/deserialize classes (added Order=, etc) in the service code.
But when I try to apply ProtoBehavior, and call the protobuf-enabled service method from Silverlight, I get nulls instead of data (or errors).
I think this is because:
- ProtoBehavior is lost in Silverlight-generated service code;
- Domain classes (types) are not in the re-used assembly, they're regenerated on the client and Order= is lost.
However at present time I can't change both points. Is there a way to use protobuf-net without refactoring the (pretty big) project to have shared ASP.NET/Silverlight assembly with domain classes, etc?
I even think it will be easier to tweak Reference.cs to add missing behavior and Order= to appropriate members (via perl/regex script), if there's no other solution, but what exactly do I need to tweak, and will it work?