Пример #1
0
 protected virtual Expression VisitDirectorySearcher(DirectorySearcherExpression node)
 {
     return(node.Update(
                Visit(node.Filter),
                node.AttributesToLoad,
                (LdapSortExpression)Visit(node.Sort),
                Visit(node.Skip),
                Visit(node.Take)
                ));
 }
        protected override Expression VisitDirectorySearcher(DirectorySearcherExpression node)
        {
            Expression result = base.VisitDirectorySearcher(node);

            if (result.NodeType != node.NodeType)
            {
                return(result);
            }
            node = (DirectorySearcherExpression)result;
            if (node.Filter.IsConstant(true))
            {
                return(node.Update(null));
            }
            if (node.Filter.IsConstant(false))
            {
                return(null);
            }
            return(node);
        }