コード例 #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)
                ));
 }
コード例 #2
0
 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));
 }
コード例 #3
0
        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);
        }
コード例 #4
0
 public ProjectionExpression Update(DirectorySearcherExpression searcher)
 {
     return(this.Update(searcher, this.Projector, this.Aggregator));
 }
コード例 #5
0
 public ProjectionExpression(DirectorySearcherExpression searcher, Expression projector, LambdaExpression aggregator)
 {
     this._searcher   = searcher;
     this._projector  = projector;
     this._aggregator = aggregator;
 }