1

EWSを使用していますが、Office365ExchangeOnlineから会話履歴フォルダーを取得したいと考えています。

ルートフォルダから子フォルダを取得してDisplayNameでフォルダを判断する方法で実現できました。

ただし、ユーザーは名前をこのフォルダーに変更できます。

この問題を解決するためにExtendedPropertyから判断するメソッドはありますか?また、別の方法はありますか?

-コードサンプル-

        Folder folder = Folder.Bind(this._exchange, WellKnownFolderName.Root);
        //acquire the total number of cases including the subfolder. 
        FolderView view = new FolderView(1);
        view.Traversal = FolderTraversal.Deep;
        FindFoldersResults result = folder.FindFolders(view);
        //acquire All folders. 
        view.PageSize = result.TotalCount;
        result = folder.FindFolders(view);
        FindFoldersResults folders = folder.FindFolders(view);

        foreach (var f in folders.Folders)
        {
            //I want to judge the history folder of the conversation here excluding the DisplayName property. 
        }

誰かが良いアイデア、サンプルを提供してください。よろしく。

4

1 に答える 1

1

フォルダに会話のアイテムが含まれているかどうかを確認するには、次のようなものを使用できます。

var filter = new SearchFilter.IsEqualTo(EmailMessageSchema.ConversationId, convId);
var itemView = new ItemView();
foreach (var f in folders.Folders)
{
    var findResult = f.FindItems(filter, itemView);
}

フィルタは、検索結果をConversationId、関心のある会話と等しいプロパティを持つアイテムのみに制限する必要があります。

于 2011-07-13T09:24:16.090 に答える