0

有参与者的约会,在查询使用约会.Invitees 属性时总是返回一个空集合。

这是我想要做的,

var calendarStore = await AppointmentManager.RequestStoreAsync(AppointmentStoreAccessType.AllCalendarsReadOnly);
var appointments = await calendarStore.FindAppointmentsAsync(DateTimeOffset.Now, TimeSpan.FromDays(30), new FindAppointmentsOptions() { IncludeHidden = true });
foreach (var appointment in appointments)
{
    // appointment.Invitees is always null, even for appointments that has some! 
    foreach (var invitee in appointment.Invitees)
    {
        // do something here...
    }
}

除了约会之外,我还尝试添加联系人功能,但徒劳无功。有什么想法为什么会出现这种奇怪的行为?

4

1 回答 1

0

appointmentsSystem访问Invitees属性时需要该功能。

 <Package xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10"
         xmlns:mp="http://schemas.microsoft.com/appx/2014/phone/manifest"
         xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10"
         xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities"
     IgnorableNamespaces="uap mp rescap">

<Capabilities>
    <Capability Name="internetClient"/>
    <uap:Capability Name="appointments" />
    <uap:Capability Name="contacts" />
    <rescap:Capability Name="appointmentsSystem" />   
 </Capabilities>

没有人可以请求访问此功能以进行商店提交

请注意,appointmentsSystem在商店应用程序中是无用的。

于 2017-10-16T08:23:55.307 回答