【问题标题】:Microsoft Exchange WebServices Appointment IsRecurring & AppointmentTypeMicrosoft Exchange WebServices Appointment IsRecurring & AppointmentType
【发布时间】:2018-01-15 03:18:04
【问题描述】:

我目前正在开发一个利用 Microsoft Exchange WebServices 的应用程序,我对Appointment.IsRecurring 属性和Appointment.AppointmentType 属性有点困惑。

根据MSDN上的这篇文章:https://msdn.microsoft.com/en-us/library/office/dd633700(v=exchg.80).aspx,如果约会类型不是RecurringMasterOccurrenceException(即Single),则该约会不是定期会议。

根据 MSDN 上的这篇文章:https://msdn.microsoft.com/en-us/library/microsoft.exchange.webservices.data.appointment.isrecurring(v=exchg.80).aspxIsRecurring 属性说明了约会是否重复。

但是,我有一些代码可以检查约会是否重复,然后检查约会类型是什么:

if (appointment.IsRecurring)
{
    if (appointment.AppointmentType == AppointmentType.RecurringMaster)
    {

    }
    else if (appointment.AppointmentType == AppointmentType.Single)
    {
        //shouldn't happen
    }
    else if (appointment.AppointmentType == AppointmentType.Occurrence || appointment.AppointmentType == AppointmentType.Exception)
    {

    }
}

由于某种原因,我遇到了一些标记为 IsRecurring 的约会,但它们的约会类型是 AppointmentType.Single

这里有人能指出我为什么面临这个“问题”,根据一个属性,这是一次定期会议,而根据另一个属性,它不是?

我创建了一个定期会议,更改了会议的一个实例,并检查了类型,但它正确地显示为 AppointmentType.Exception

感谢您就此事提供的所有意见/指导。

干杯。

凯文

【问题讨论】:

    标签: c# exchange-server exchangewebservices appointment


    【解决方案1】:

    抱歉,我无法说明发生这种情况的实际原因,但在我的测试中,如果我在 Outlook 日历 GUI 中,我通过按住 CTRL 键并单击并拖动来复制定期会议的一个实例结果是该特定约会的非重复副本,但由于某种原因,该副本仍保留 IsRecurring 标志且 AppointmentType 为 Single。

    因此,这不是其背后的原因,但可能是您所看到的部分原因。我同意这看起来很奇怪。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2017-03-31
      • 1970-01-01
      • 2020-08-25
      • 2013-04-25
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多