Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/excel/25.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Api 在Exchange 2010中加载所有约会属性,包括扩展属性_Api_Calendar_Exchangewebservices_Exchange Server 2010 - Fatal编程技术网

Api 在Exchange 2010中加载所有约会属性,包括扩展属性

Api 在Exchange 2010中加载所有约会属性,包括扩展属性,api,calendar,exchangewebservices,exchange-server-2010,Api,Calendar,Exchangewebservices,Exchange Server 2010,我试图列出与给定日历约会相关的所有属性,但我不知道是否有方法不单独加载每个属性。根据我在网上看到的一些代码,我知道我可以做如下事情: /// <summary> /// List all the properties of an appointment /// </summary> public void listProps() { Folder myCalendar = Folder.Bind(service, W

我试图列出与给定日历约会相关的所有属性,但我不知道是否有方法不单独加载每个属性。根据我在网上看到的一些代码,我知道我可以做如下事情:

    /// <summary>
    /// List all the properties of an appointment
    /// </summary>
    public void listProps()
    {
        Folder myCalendar = Folder.Bind(service, WellKnownFolderName.Calendar);
        ItemView view = new ItemView(10);
        FindItemsResults<Item> findResults;

        do
        {
            findResults = myCalendar.FindItems(new SearchFilter.IsEqualTo(ItemSchema.ExtendedProperties, MyPropertySetId), view);
            service.LoadPropertiesForItems(findResults, new PropertySet(ItemSchema.Subject, ItemSchema.Body));

            foreach (Item item in findResults)
            {
                Console.WriteLine(item.Subject);
                Console.WriteLine(item.Body);
            }

            if (findResults.NextPageOffset.HasValue)
            {
                view.Offset = findResults.NextPageOffset.Value;
            }

        } while (findResults.MoreAvailable);
    }
这可能吗


谢谢

不,这是不可能的

您可以使用预定义的属性集,如:
PropertySet.FirstClassProperties
来获取已知的属性集

根本不支持以这种方式获取扩展属性。必须明确指定要访问的扩展属性。例如:

ItemView view = new ItemView(10);

ExtendedPropertyDefinition extendedPropertyDefinition =
new ExtendedPropertyDefinition("Expiration Date", MapiPropertyType.String);

view.PropertySet = 
new PropertySet(BasePropertySet.FirstClassProperties, ItemSchema.Subject,extendedPropertyDefinition);
ItemView view = new ItemView(10);

ExtendedPropertyDefinition extendedPropertyDefinition =
new ExtendedPropertyDefinition("Expiration Date", MapiPropertyType.String);

view.PropertySet = 
new PropertySet(BasePropertySet.FirstClassProperties, ItemSchema.Subject,extendedPropertyDefinition);