When x = evententry.Times[0];
evententry.Times.Clear()
evententry.Times.Add(x);
and later persist this evententry, you will have one additonal When line in your XML.
The reason is that the extension elements are, for the collections, keeping a double list. The AtomEntry base class contains a list of extension elements, and this list is used for loading and saving of all not known entities.
Now the eventEntry takes advantage of the list. But, it also keeps lists for When/Who/Where collections. So you add an entry to the When collection, it will be added to it's own list, and to the extensionelements base list. Remove it, and it will be removed on both sides.
The original implementation assumed that CollecitonBase.Clear() calls Remove(). But, sadly, it does not. So, it's needed to override OnClear() to remove the elements from the base list as well.
This fix will be in the next drop. As this is isolated, and if you like, just grab the attached file with the fix.
Regards
Frank Mantek
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Google Calendar Data API" 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/google-calendar-help-dataapi
-~----------~----~----~----~------~----~------~--~---
extcollections.cs
Description: Binary data
