本文介绍了GroupMemberCollection未在EWS托管API中返回集合的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 我正在使用Exchange Webservice Managed API查找分发列表的一些memabers。它发现DL和我可以获得除"会员"之外的大多数属性。采集。它返回一个集合但总是空的,depsite有100个成员。这是我的代码I am using Exchange Webservice Managed API to find some memabers of a distribution list. It is finding the DL and I can get most of the properties except the "Members" collection. It is returning a collection but is always empty, depsite having 100's of members. Here is my code private 静态 void FindItemInFolder( ExchangeService service, FolderId folderId) privatestaticvoid FindItemInFolder(ExchangeService service,FolderId folderId) { ItemView view = new ItemView (100); ItemView view =newItemView(100); view.Traversal = view.Traversal = ItemTraversal 。浅; ItemTraversal.Shallow; FindItemsResults < 项目 > items = service.FindItems(folderId,view); FindItemsResults<Item> items = service.FindItems(folderId, view); if (items!= null ) if (items !=null) { if (items.Count()> 0) if (items.Count() > 0) { foreach ( 项目 item items) foreach (Item item in items) { // Console.WriteLine(" \t\t\tItem Subject = \" {0} \"",item.Subject); if (item ContactGroup ) if (itemisContactGroup) { ContactGroup dl =( ContactGroup )item; ContactGroup dl = (ContactGroup)item; if (dl.Members!= null ) if (dl.Members !=null) { GroupMemberCollection members =( GroupMemberCollection )dl.Members; GroupMemberCollection members = (GroupMemberCollection)dl.Members; //这总是打印出0个成员。 控制台 。WriteLine( " {0} 在DL {1}上找到的成员" ,members.Count(),dl.DisplayName); Console.WriteLine("{0} members found on DL {1}", members.Count(), dl.DisplayName); foreach ( GroupMember 成员 成员) foreach (GroupMember member in members) { //永远不会被解雇 控制台 。WriteLine( " Email :{0}" ,member.AddressInformation.Name); Console.WriteLine("Email : {0}", member.AddressInformation.Name);} } } } } } } 参数如下所示.. ExchangseService:完全限定的Exchange对象ExchangseService: A fully qualified Exchange object FolderId:folderId,包含DL的。我正在从WellknownFolder遍历" PublicFoldersRoot"穿过整个树。 FolderId: The folderId, whcih contains the DL's. I am traversing from WellknownFolder "PublicFoldersRoot" through the full tree. 如果有人可以提供帮助,我们将非常感激。 我试过没有API(直接使用webservice),结果是exac相同。 提前致谢, -ASK -ASK推荐答案 不知道为什么我甚至没有回复一个回复。我仍然被打动了 这个,有人可以帮忙吗?Not sure why I haven't recived even one reply. I am still struck on this, can someone help?谢谢, -ASK 这篇关于GroupMemberCollection未在EWS托管API中返回集合的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 09-21 19:18