Actually, the main issue is with Recurrence because of a check :
set
{
if (recurrence != null)
{
ExtensionElements.Remove(recurrence);
}
recurrence = value;
ExtensionElements.Add(recurrence);
}
the recurrence variable is always null first time, so nothing is removed from
the list and thus, one more is added to the list.
In case of Visibility and Transparency, static variables have been defined for
it. I think the same has to be corrected for QuickAdd, Status, Notification as
well.
Thanks
Kulvinder Singh
----- Original Message ----
From: Kulvinder Singh <[EMAIL PROTECTED]>
To: Google API <[email protected]>
Sent: Friday, April 18, 2008 4:34:17 PM
Subject: Issues in EventEntry class
Hi,
I am encountering some issues in implementation of EventEntry class. One of the
example is :
Create a Recurring event in GOogle, Download it using the API, change something
in the Recurrence String and set it as follows :
Google.GData.Extensions.Recurrence objGCalRecurrence = new
Google.GData.Extensions.Recurrence();
objGCalRecurrence.Value = "ical string here";
eventEntry.Recurrence = objGCalRecurrence;
The issue is that it actually adds another extension element instead of
replacing the gd:recurrence
Same is the case for EventVisibility, EventTransparency and RecurrenceException
FOllowing is what is implemented in EventEntry.cs
/// <summary>
/// property accessor for the Event Visibility
/// </summary>
public Visibility EventVisibility
{
get { return visibility; }
set
{
if (visibility != null)
{
ExtensionElements.Remove(visibility);
}
visibility = value;
ExtensionElements.Add(visibility);
}
}
/// <summary>
/// property accessor for the EventTransparency
/// </summary>
public Transparency EventTransparency
{
get { return transparency;}
set
{
if (transparency != null)
{
ExtensionElements.Remove(transparency);
}
transparency = value;
ExtensionElements.Add(transparency);
}
}
/// <summary>
/// property accessor for the Recurrence
/// </summary>
public Recurrence Recurrence
{
get { return recurrence;}
set
{
if (recurrence != null)
{
ExtensionElements.Remove(recurrence);
}
recurrence = value;
ExtensionElements.Add(recurrence);
}
}
/// <summary>
/// property accessor for the RecurrenceException
/// </summary>
public RecurrenceException RecurrenceException
{
get { return exception;}
set
{
if (exception != null)
{
ExtensionElements.Remove(exception);
}
exception = value;
ExtensionElements.Add(exception);
}
}
Instead, it should be like :
/// <summary>
/// property accessor for the OriginalEvent
/// </summary>
public OriginalEvent OriginalEvent
{
get
{
return
FindExtension(GDataParserNameTable.XmlOriginalEventElement,
BaseNameTable.gNamespace) as OriginalEvent;
}
set
{
ReplaceExtension(GDataParserNameTable.XmlOriginalEventElement,
BaseNameTable.gNamespace, value);
}
}
Thanks
Kulvinder Singh
________________________________
Be a better friend, newshound, and
know-it-all with Yahoo! Mobile. Try it now.
____________________________________________________________________________________
Be a better friend, newshound, and
know-it-all with Yahoo! Mobile. Try it now.
http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
--~--~---------~--~----~------------~-------~--~----~
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?hl=en
-~----------~----~----~----~------~----~------~--~---