[protobuf] IEnumerable in Silverlight with "external" Add(T item) method

2011-10-17 Thread Broken Pipe
I'm trying to use ProtoBuf-net in Silverlight project, I'm using my existing domain objects, which define most collection's as: private ICollection _internalTSet; public IEnumerable TSet {get;set;} public void AddTItem(T item) {} So my model using external Add method defined in class instead of

[protobuf] MergedDescriptorDatabase and conflicting files

2011-10-17 Thread cubiq4
I have a problem with the MergedDescriptorDatabase and FindMessageTypeByName. This is merging 2 databases. FindMessageTypeByName will actually call TryFindSymbolInFallbackDatabase which calls FindFileContainingSymbol. Consider the first database has no files loaded to begin with. The lookup

[protobuf] Deleting a member at particular index in a repeated member

2011-10-17 Thread Suraj
Can we delete an entry at a particular index in a repeated member in a protobuff object? -- 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 ema

Re: [protobuf] IEnumerable in Silverlight with "external" Add(T item) method

2011-10-17 Thread Marc Gravell
Addressed on stackoverflow: http://stackoverflow.com/questions/7793527/protobuf-net-serializing-ienumerablet Marc On 17 Oct 2011, at 12:35, Broken Pipe wrote: > I'm trying to use ProtoBuf-net in Silverlight project, I'm using my > existing domain objects, which define most collection's as: >

[protobuf] Re: Contribution: C++Builder Compiling

2011-10-17 Thread Scott Saad
My experience has been that C++Builder is worse (less standards- > compliant / less capable) than GCC and MSVC, so most changes to > accommodate it are actually working around its shortcomings. > I've also struggled with C++Builder in the past. > I was working some on getting protobuf to wo

Re: [protobuf] Deleting a member at particular index in a repeated member

2011-10-17 Thread Igor Gatis
foo.mutable_repeated_field()->SwapElements(index_to_remove, foo.repeated_field_size() - 1); foo.mutable_repeated_field()->RemoveLast(); On Mon, Oct 17, 2011 at 04:51, Suraj wrote: > Can we delete an entry at a particular index in a repeated member in a > protobuff object? > > -- > You received t

[protobuf] Re: Deleting a member at particular index in a repeated member

2011-10-17 Thread Eyal Farago
this is not doing exactly what Suraj asked for, as it modifies the order of elements in the repeated field. assuming order of the elements does matter, you have two options: 1. use the SwapElements() idiom in a loop until the element to be removed is the last one and than call RemoveLast(). 2. get