Re: ProtoContract applied to structs

2009-08-18 Thread Marc Gravell
Part of the problem here is that I can't think of a clean way to do it that doesn't go mad with boxing, or losing struct changes. I'm guessing that for xna you have mutable structs, so immutability isn't necessarily an issue, but then I need lots of "ref" instead... Fun... Also; note that the CF

Re: ProtoContract applied to structs

2009-08-18 Thread martin
Damn that's a shame, I need to minimise allocations in my current system (it's networking for games, and I eventually plan to port it to the Xbox using XNA, and the xbox GC isn't so great) THanks for the help Marc --~--~-~--~~~---~--~~ You received this message bec

Re: ProtoContract applied to structs

2009-08-17 Thread Marc Gravell
(oops, ignore the double-click!) >From "ProtoContract", I'm taking this to be a protobuf-net question. No, it doesn't currently offer a way to serialize structs; the main reason for this being that structs should pretty-much always be immutable, which makes a reflection-based API (such as protob

Re: ProtoContract applied to structs

2009-08-17 Thread Marc Gravell
On Aug 18, 3:43 am, martin wrote: > It can't be done, which is a shame, is there a particular reason for > this and is there some way around it? (besides the obvious one of > turning my struct into a class) --~--~-~--~~~---~--~~ You received this message because