我希望将隐藏数据保存到 Outlook 365 事件。这就是我目前正在做的事情。
SingleValueLegacyExtendedProperty singleEP1 = new SingleValueLegacyExtendedProperty
{
Id = "String " + "{" + Guid.NewGuid() + "} " + "Name " + "PlanningID",
Value = appointment.PlanningId.ToString() == null ? "0" : appointment.PlanningId.ToString()
};
SingleValueLegacyExtendedProperty singleEP2 = new SingleValueLegacyExtendedProperty
{
Id = "String " + "{" + Guid.NewGuid() + "} " + "Name " + "CustomerName",
Value = appointment.CustomerName.ToString() == null ? "" : appointment.CustomerName.ToString()
};
SingleValueLegacyExtendedProperty singleEP3 = new SingleValueLegacyExtendedProperty
{
Id = "String " + "{" + Guid.NewGuid() + "} " + "Name " + "ProjectName",
Value = appointment.ProjectName.ToString() == null ? "" : appointment.ProjectName.ToString()
};
SingleValueLegacyExtendedProperty singleEP4 = new SingleValueLegacyExtendedProperty
{
Id = "String " + "{" + Guid.NewGuid() + "} " + "Name " + "PresentationName",
Value = appointment.PrestationName.ToString() == null ? "" : appointment.PrestationName.ToString()
};
当我使用呼叫获取所有日历项目时:
ICalendarCalendarViewCollectionPage retrievedEvents = await graphClient
.Me
.Calendars["Calendar"]
.CalendarView
.Request(options)
.GetAsync();
然后我在单值扩展属性上得到一个 NULL。