簡體   English   中英

Exchange-Microsoft.Exchange.WebServices.Data.Recurrence.YearlyPattern中缺少時間間隔

[英]Exchange - Interval is missing in Microsoft.Exchange.WebServices.Data.Recurrence.YearlyPattern

通過諸如Outlook之類的客戶端創建約會時,您可以為每年重復的約會設置時間間隔。 但是,該成員未包含在我們必須通過Web服務使用的類中:

http://msdn.microsoft.com/zh-cn/library/microsoft.exchange.webservices.data.recurrence.yearlypattern_members(v=exchg.80).aspx

這是因為YearlyPattern並不是IntervalPattern的子類,因為其他所有patterntype都是:

http://msdn.microsoft.com/zh-cn/library/microsoft.exchange.webservices.data.recurrence(v=exchg.80).aspx

有人知道,這是什么原因? 有機會獲得interval屬性嗎? 有可能可以使用的解決方法嗎?

這是API中明顯的空白,出於某種原因,出於MS的無限智慧,他們決定排除該鍵值。

現在我還沒有完整的代碼示例,但是我確實有所有的難題。 您將需要從另一個屬性中提取值。

首先,您需要獲取PidLidAppointmentRecur MAPI屬性

這是擴展屬性定義,將其添加到您要求的約會屬性集合中:

static ExtendedPropertyDefinition AppointmentRecur = new ExtendedPropertyDefinition(
    DefaultExtendedPropertySet.Appointment,
    0x8216,
    MapiPropertyType.Binary
);

Extract the byte array: appointment.TryGetProperty(AppointmentRecur, out byte[] appointment_recurence);

 Extract the byte array: appointment.TryGetProperty(AppointmentRecur, out byte[] appointment_recurence); 

然后解析它,請參閱本指南以開始使用:

您正在尋找3個值:

  • 遞歸頻率
  • 模式類型

RecurFrequency&PatternType是枚舉,我沒有資料來源。 周期是間隔號。

我希望找到類似的東西:

  • RecurFrequency = 0x200D(每年)
  • PatternType = 0x0002(月)

因此,一旦有了值,就需要根據PatternType和Period計算年度間隔。

我將獲得RecurFrequency以進行驗證。

好吧,我希望它現在很明顯,但是如果您想解析整個結構,則可以用它代替EWS Recurrence屬性。

另一個好的資源:

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM