ews-managed-api icon indicating copy to clipboard operation
ews-managed-api copied to clipboard

attribute item:InferenceClassification not found

Open gastart opened this issue 7 years ago • 1 comments

I've been using the EWS managed the API for a couple of hours so my knowledge of how to properly use the api and its internal workings are still limited.

I am trying to synch the folderhierarchy by first getting the folder change collection via the below (the the important code snippets are shown)

          var folderChangeCollectionThisRun =
               exchangeService.SyncFolderHierarchy(
                   new FolderId(WellKnownFolderName.Root),
                   PropertySet.IdOnly,
                   synchState);

and then getting the details using

        var requiredFolderPropertySet =
            new PropertySet(
            BasePropertySet.IdOnly,
            FolderSchema.DisplayName,
            FolderSchema.ParentFolderId,
            FolderSchema.DisplayName);

        foreach (var changeFolder in changeFolderList)
        {
                var folder = Folder.Bind(exchangeService, changeFolder.FolderId, requiredFolderPropertySet);

                folder.Load();
               
               //persistence code goes here
        } 

Complaint 1 On three of the folders I've got three instances where an KeyNotFoundException bubbling up which in itself it is not very helpfull for the api user because he can do nothing about it.

Complaint 2 At any rate, the exception is thrown in by

        internal static PropertyDefinitionBase FindPropertyDefinition(string uri)
        {
            return ServiceObjectSchema.allSchemaProperties.Member[uri];
        }

in \Core\ServiceObjects\Schemas\ServiceObjectSchema.cs when called from method TryLoadFromXml from PropertyDefinitions\PropertyDefinitionBase.cs

when trying to find item:InferenceClassification. This property seems to be missing in class ItemSchema.

Complaint 3 TryLoadFromXml needs to protected against such exceptions.

gastart avatar Nov 09 '17 11:11 gastart

any update with this problem? I also try to access InferenceClassification with ews api

leungyukshing avatar Mar 31 '21 04:03 leungyukshing