本文介绍了Microsoft.Exchange.WebServices.Data中Room的BookingWindow属性。 C#的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何使用C#中的Microsoft.Exchange.WebServices.Data类检索Rooms的BookingWindow属性
How to retrieve BookingWindow property for Rooms using Microsoft.Exchange.WebServices.Data class in C#
推荐答案
FolderId CalendarFolderId = new FolderId(WellKnownFolderName.Calendar,"[email protected]");
CalendarFolder calendar = CalendarFolder.Bind(service, CalendarFolderId, new PropertySet(BasePropertySet.FirstClassProperties));
UserConfiguration uc = UserConfiguration.Bind(service, "Calendar", CalendarFolderId, UserConfigurationProperties.All);
Object ForwardRequestsToDelegatesVal = null;
Object BookingWindowInDaysVal = null;
if (uc.Dictionary.TryGetValue("BookingWindowInDays", out BookingWindowInDaysVal))
{
Console.WriteLine((Int32)BookingWindowInDaysVal);
}
if (uc.Dictionary.TryGetValue("ForwardRequestsToDelegates",out ForwardRequestsToDelegatesVal))
{
Console.WriteLine((bool)ForwardRequestsToDelegatesVal);
}
Object AutomateProcessingVal = null;
if (uc.Dictionary.TryGetValue("AutomateProcessing", out AutomateProcessingVal))
{
Console.WriteLine((int)AutomateProcessingVal);
}
Object AllBookInPolicy = null;
if (uc.Dictionary.TryGetValue("AllBookInPolicy", out AllBookInPolicy))
{
Console.WriteLine((bool)AllBookInPolicy);
}
Object BookInPolicyLegDNVal = null;
if (uc.Dictionary.TryGetValue("BookInPolicyLegDN", out BookInPolicyLegDNVal))
{
foreach (String UserDn in (String[])BookInPolicyLegDNVal)
{
Console.WriteLine(UserDn);
}
}
Object AllRequestInPolicyVal = null;
if (uc.Dictionary.TryGetValue("AllRequestInPolicy", out AllRequestInPolicyVal))
{
Console.WriteLine((bool)AllRequestInPolicyVal);
}
干杯zh
Glen
Cheers
Glen
这篇关于Microsoft.Exchange.WebServices.Data中Room的BookingWindow属性。 C#的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!