Microsoft.Exchange.WebServices.Data中Room的BookingWindow属性。 C# [英] BookingWindow property for Room in Microsoft.Exchange.WebServices.Data. C#

查看:98
本文介绍了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#

推荐答案

如果已将其设置为其他内容默认为180天,然后您应该能够使用日历FAI配置对象访问它,例如

If it has been set to something other the default of 180 days then you should be able access it using the Calendar FAI configuration object eg

           FolderId CalendarFolderId = new FolderId(WellKnownFolderName.Calendar,"testroom@domain.com");
            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#的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆