本文整理汇总了C#中Google.GData.Client.AtomEntry.Delete方法的典型用法代码示例。如果您正苦于以下问题:C# AtomEntry.Delete方法的具体用法?C# AtomEntry.Delete怎么用?C# AtomEntry.Delete使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Google.GData.Client.AtomEntry
的用法示例。
在下文中一共展示了AtomEntry.Delete方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: DeleteComment
static void DeleteComment(AtomEntry commentEntry)
{
Console.WriteLine("\nDeleting the comment");
if (commentEntry != null)
{
// Delete the comment.
Console.WriteLine(" Press enter to delete the new comment post");
Console.ReadLine();
commentEntry.Delete();
}
}
示例2: SolveConflict
/// <summary>
/// Solve conflict by comparing last modified time
/// </summary>
/// <param name="addToLocal">List of GGItems to be added to local GGList</param>
/// <param name="removeFromLocal">List of GGItems to be removed from local GGList</param>
/// <param name="GGService">Google calendar service object</param>
/// <param name="GGCalendar">GG calendar</param>
/// <param name="ggItem">The local GGItem to be compared</param>
/// <param name="theEvent">The Google event to be compared</param>
private void SolveConflict(List<GGItem> addToLocal, List<GGItem> removeFromLocal, CalendarService GGService, CalendarEntry GGCalendar, GGItem ggItem, AtomEntry theEvent)
{
if (theEvent.Updated.CompareTo(ggItem.GetLastModifiedTime()) < 0)
{ // Local is the latest version : delete on server, then add the latest one
Log("Local is the latest");
theEvent.Delete();
Log("Delete on server");
ggItem.SetEventAbsoluteUrl(AddGGEvent(GGService, GGCalendar, ggItem));
Log("Add to server: " + ggItem.ToString());
}
else
{ // Server is the latest version : delete on local, then add the latest one
Log("Server is the latest");
EventEntry e = (EventEntry)theEvent;
GGItem newGGItem = new GGItem(e.Title.Text, e.Times[0].EndTime, ExtractTagFromContents(e.Content.Content), DateTime.Parse(e.Updated.ToLongTimeString()), e.Id.AbsoluteUri, ExtractPathFromContents(e.Content.Content));
removeFromLocal.Add(ggItem);
addToLocal.Add(newGGItem);
Log("Update to lsocal: " + newGGItem.ToString());
}
}
示例3: DeleteEntry
/** Delete the specified blog entry. */
static void DeleteEntry(AtomEntry toDelete)
{
Console.WriteLine("\nDeleting post");
// Delete the edited entry
if (toDelete != null)
{
Console.WriteLine(" Press enter to delete the new blog post");
Console.ReadLine();
toDelete.Delete();
}
}