private static bool ShouldIncludeProperty(FilterNode node, FilterNode childNode) { if (childNode != null) { // if this property or any children of this property are included, include it if (childNode.IsAnyIncluded()) { return(true); } // if this property is explicitly excluded, exclude it if (childNode.IsIncluded == false) { return(false); } } // exclude this property if any siblings are included return(!node.IsSiblingIncluded(childNode)); }