嗯,首先......他们为什么不包括一种方法来从列表中排除成员这博格尔斯我的心..有什么理由让我只是没有看到?我无法想象有,但我仍然知道这么少...
虽然经过几次重新设计,我已经设法使这项工作。我们抓住所有人的名单,并与拒绝的人加入,并将拒绝的日期添加到其中。
declinedNode = entityNode.GetChildNode("link-entity", "link-entity[@name='xx_decline_{0}']".FormatWith(memberType));
declinedNode.SetAttribute("name", "xx_decline_{0}".FormatWith(memberType));
declinedNode.SetAttribute("from", "xx_parent_{0}id".FormatWith(memberType));
declinedNode.SetAttribute("to", "{0}id".FormatWith(memberType));
declinedNode.SetAttribute("link-type", "outer");
declinedNode.SetAttribute("alias", "declined");
var declinedDateNode = fetchXmlDoc.CreateNode(XmlNodeType.Element, "attribute", string.Empty);
declinedDateNode .SetAttribute("name", "xx_declineddate");
declinedNode.AppendChild(declinedDateNode);
然后服务器端已经通过列表中的所有成员循环,所以我们只是把一个条件,如果它已经为我们忽略了它的下降日期的值。