当前位置: 首页>>代码示例>>C#>>正文


C# AtomEntry.Delete方法代码示例

本文整理汇总了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();
     }
 }
开发者ID:Zelxin,项目名称:RPiKeg,代码行数:11,代码来源:ConsoleSample.cs

示例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());
     }
 }
开发者ID:wertkh32,项目名称:gg,代码行数:29,代码来源:GGSync.cs

示例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();
     }
 }
开发者ID:Zelxin,项目名称:RPiKeg,代码行数:12,代码来源:ConsoleSample.cs


注:本文中的Google.GData.Client.AtomEntry.Delete方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。