protected virtual Expression VisitDirectorySearcher(DirectorySearcherExpression node)
 {
     return(node.Update(
                Visit(node.Filter),
                node.AttributesToLoad,
                (LdapSortExpression)Visit(node.Sort),
                Visit(node.Skip),
                Visit(node.Take)
                ));
 }
 public ProjectionExpression Update(DirectorySearcherExpression searcher, Expression projector, LambdaExpression aggregator)
 {
     if (
         searcher == this.Searcher &&
         projector == this.Projector &&
         aggregator == this.Aggregator
         )
     {
         return(this);
     }
     return(new ProjectionExpression(searcher, projector, aggregator));
 }
        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);
        }
 public ProjectionExpression Update(DirectorySearcherExpression searcher)
 {
     return(this.Update(searcher, this.Projector, this.Aggregator));
 }
 public ProjectionExpression(DirectorySearcherExpression searcher, Expression projector, LambdaExpression aggregator)
 {
     this._searcher   = searcher;
     this._projector  = projector;
     this._aggregator = aggregator;
 }