gpt4 book ai didi

c# - 使用 Google Calendar API 添加和检索扩展属性

转载 作者:行者123 更新时间:2023-11-30 22:42:21 25 4
gpt4 key购买 nike

我正在编写代码以将我的 Outlook 日历与谷歌日历同步。我可以添加条目,但问题是当我想更新谷歌日历中的项目时,我不知道要更新哪一个。

为了解决我正在添加扩展属性

        ExtendedProperty property = new ExtendedProperty();
property.Name = reminderAppt.GlobalAppointmentID;
property.Value = "App Id";
entry.ExtensionElements.Add(property);

问题是我不知道如何在调用 ItemChanged 时检索相同的条目。

最佳答案

这就是我在检索扩展属性元素时使用的内容。

foreach (Google.GData.Client.IExtensionElementFactory  property in  googleEvent.ExtensionElements)
{
ExtendedProperty customProperty = property as ExtendedProperty;
if (customProperty != null)
genericEvent.EventID = customProperty.Value;
}

关于c# - 使用 Google Calendar API 添加和检索扩展属性,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4459708/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com