• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# Expressions.ExpressionVisitor类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中System.Linq.Expressions.ExpressionVisitor的典型用法代码示例。如果您正苦于以下问题:C# ExpressionVisitor类的具体用法?C# ExpressionVisitor怎么用?C# ExpressionVisitor使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



ExpressionVisitor类属于System.Linq.Expressions命名空间,在下文中一共展示了ExpressionVisitor类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: VisitChildren

 protected override Expression VisitChildren(ExpressionVisitor visitor) {
     Expression b = visitor.Visit(_body);
     if (b == _body) {
         return this;
     }
     return new FinallyFlowControlExpression(b);
 }
开发者ID:jschementi,项目名称:iron,代码行数:7,代码来源:FinallyFlowControlExpression.cs


示例2: VisitChildren

 protected override Expression VisitChildren(ExpressionVisitor visitor) {
     Expression v = visitor.Visit(_value);
     if (v == _value) {
         return this;
     }
     return Utils.MakeYield(_target, v, YieldMarker);
 }
开发者ID:rudimk,项目名称:dlr-dotnet,代码行数:7,代码来源:YieldExpression.cs


示例3: VisitChildren

 protected override Expression VisitChildren(ExpressionVisitor visitor) {
     Expression v = visitor.Visit(_variable);
     if (v == _variable) {
         return this;
     }
     return Utils.Delete(v);
 }
开发者ID:jxnmaomao,项目名称:ironruby,代码行数:7,代码来源:DeleteStatement.cs


示例4: VisitChildren

 protected override Expression VisitChildren(ExpressionVisitor visitor) {
     Expression body = visitor.Visit(_body);
     if (body == _body) {
         return this;
     }
     return new SkipInterpretExpression(body);
 }
开发者ID:apboyle,项目名称:ironruby,代码行数:7,代码来源:SkipInterpretExpression.cs


示例5: VisitChildren

 protected override Expression VisitChildren(ExpressionVisitor visitor) {
     var instance = visitor.Visit(_expr);
     if (instance != _expr) {
         return new LightCheckAndThrowExpression(instance);
     }
     return this;
 }
开发者ID:jschementi,项目名称:iron,代码行数:7,代码来源:LightCheckAndThrowExpression.cs


示例6: VisitChildren

 protected override Expression VisitChildren(ExpressionVisitor visitor) {
     Expression v = visitor.Visit(_value);
     if (v == _value) {
         return this;
     }
     return Utils.Assign(_name, v);
 }
开发者ID:jxnmaomao,项目名称:ironruby,代码行数:7,代码来源:UnboundAssignment.cs


示例7: VisitChildren

 protected override Expression VisitChildren(ExpressionVisitor visitor) {
     var expr = visitor.Visit(_expr);
     if (expr != _expr) {
         return new LightExceptionConvertingExpression(expr, _supportsLightEx);
     }
     return this;
 }
开发者ID:madpilot,项目名称:ironruby,代码行数:7,代码来源:LightExceptionConvertingExpression.cs


示例8: VisitChildren

        /// <summary>
        ///     Reduces the node and then calls the <see cref="ExpressionVisitor.Visit(System.Linq.Expressions.Expression)" /> method passing the
        ///     reduced expression.
        ///     Throws an exception if the node isn't reducible.
        /// </summary>
        /// <param name="visitor"> An instance of <see cref="ExpressionVisitor" />. </param>
        /// <returns> The expression being visited, or an expression which should replace it in the tree. </returns>
        /// <remarks>
        ///     Override this method to provide logic to walk the node's children.
        ///     A typical implementation will call visitor.Visit on each of its
        ///     children, and if any of them change, should return a new copy of
        ///     itself with the modified children.
        /// </remarks>
        protected override Expression VisitChildren(ExpressionVisitor visitor)
        {
            visitor.Visit(_tableExpression);
            visitor.Visit(_predicate);

            return this;
        }
开发者ID:RickyLin,项目名称:EntityFramework,代码行数:20,代码来源:JoinExpressionBase.cs


示例9: VisitChildren

        /// <summary>
        /// 简化节点,然后对简化的表达式调用访问者委托。该方法在节点不可简化时引发异常。
        /// </summary>
        /// <returns>
        /// 要访问的表达式,或应在树中替换此表达式的表达式。
        /// </returns>
        /// <param name="visitor"><see cref="T:System.Func`2"/> 的一个实例。</param>
        protected override Expression VisitChildren(ExpressionVisitor visitor)
        {
            var newArguments = visitor.VisitAndConvert(_arguments, "VisitChildren");

            return newArguments != _arguments
                ? new SqlFunctionExpression(FunctionName, newArguments, Type)
                : this;
        }
开发者ID:Mozlite,项目名称:MozliteFramework,代码行数:15,代码来源:SqlFunctionExpression.cs


示例10: VisitChildren

		protected override Expression VisitChildren(ExpressionVisitor visitor)
		{
			QueryNode newTarget = (QueryNode)visitor.Visit(Target);
			if (newTarget == Target)
				return this;
			else
				return new MergeByName(newTarget);
		}
开发者ID:Bombadil77,项目名称:SharpDevelop,代码行数:8,代码来源:MergeByName.cs


示例11: VisitChildren

        protected override Expression VisitChildren(ExpressionVisitor visitor)
        {
            var arguments = visitor.VisitAndConvert(new ReadOnlyCollection<Expression>(_arguments), "VisitChildren");

            return arguments != Arguments
                ? new SqlFunctionExpression(FunctionName, arguments, Type)
                : this;
        }
开发者ID:JamesWang007,项目名称:EntityFramework,代码行数:8,代码来源:SqlFunctionExpression.cs


示例12: VisitChildren

        protected override Expression VisitChildren(ExpressionVisitor visitor)
        {
            var newPredicate = visitor.Visit(_predicate);

            return _predicate != newPredicate
                ? new DiscriminatorPredicateExpression(newPredicate, QuerySource)
                : this;
        }
开发者ID:adwardliu,项目名称:EntityFramework,代码行数:8,代码来源:DiscriminatorPredicateExpression.cs


示例13: Accept

        protected override Expression Accept(ExpressionVisitor visitor)
        {
            var parsedVisitor = visitor as CompilingExpressionVisitor;
            if (parsedVisitor != null)
                return Accept(parsedVisitor);

            return base.Accept(visitor);
        }
开发者ID:nbarbettini,项目名称:simple-linq,代码行数:8,代码来源:ParsedExpression.cs


示例14: VisitChildren

        protected override Expression VisitChildren(ExpressionVisitor visitor)
        {
            var newTimestampExpression = visitor.Visit(TimestampExpression);

            return newTimestampExpression != TimestampExpression
                ? new AtTimeZoneExpression(newTimestampExpression, TimeZone)
                : this;
        }
开发者ID:yonglehou,项目名称:Pomelo.EntityFrameworkCore.MyCat,代码行数:8,代码来源:AtTimeZoneExpression.cs


示例15: VisitChildren

    protected override Expression VisitChildren (ExpressionVisitor visitor)
    {
      var result = visitor.Visit (_expression);
      if (result != _expression)
        return new NonReducibleExtensionExpression (result);

      return this;
    }
开发者ID:natemcmaster,项目名称:Relinq,代码行数:8,代码来源:NonReducibleExtensionExpression.cs


示例16: VisitChildren

		protected override Expression VisitChildren(ExpressionVisitor visitor)
		{
			QueryNode newTarget = (QueryNode)visitor.Visit(Target);
			if (newTarget == Target)
				return this;
			else
				return new Limit(newTarget, Start, Length);
		}
开发者ID:Paccc,项目名称:SharpDevelop,代码行数:8,代码来源:Limit.cs


示例17: VisitChildren

        protected override Expression VisitChildren(ExpressionVisitor visitor) {
            var exception = visitor.Visit(_exception);
            if (exception != _exception) {
                return new LightThrowExpression(exception);
            }

            return this;
        }
开发者ID:jschementi,项目名称:iron,代码行数:8,代码来源:LightThrowExpression.cs


示例18: VisitChildren

        /// <summary>
        ///     Reduces the node and then calls the <see cref="ExpressionVisitor.Visit(System.Linq.Expressions.Expression)" /> method passing the
        ///     reduced expression.
        ///     Throws an exception if the node isn't reducible.
        /// </summary>
        /// <param name="visitor"> An instance of <see cref="ExpressionVisitor" />. </param>
        /// <returns> The expression being visited, or an expression which should replace it in the tree. </returns>
        /// <remarks>
        ///     Override this method to provide logic to walk the node's children.
        ///     A typical implementation will call visitor.Visit on each of its
        ///     children, and if any of them change, should return a new copy of
        ///     itself with the modified children.
        /// </remarks>
        protected override Expression VisitChildren(ExpressionVisitor visitor)
        {
            var newOperand = visitor.Visit(Operand);

            return newOperand != Operand
                ? new ExplicitCastExpression(newOperand, _type)
                : this;
        }
开发者ID:RickyLin,项目名称:EntityFramework,代码行数:21,代码来源:ExplicitCastExpression.cs


示例19: VisitChildren

        protected override Expression VisitChildren(ExpressionVisitor visitor) {
            Expression lineNo = visitor.Visit(_lineNumberExpression);
            if (lineNo != _lineNumberExpression) {
                return new LastFaultingLineExpression(lineNo);
            }

            return this;
        }
开发者ID:BenHall,项目名称:ironruby,代码行数:8,代码来源:LastFaultingLineExpression.cs


示例20: VisitChildren

        protected override Expression VisitChildren(ExpressionVisitor visitor)
        {
            var newExpression = visitor.Visit(_operand);

            return newExpression != _operand
                ? new NotNullableExpression(newExpression)
                : this;
        }
开发者ID:ChuYuzhi,项目名称:EntityFramework,代码行数:8,代码来源:NotNullableExpression.cs



注:本文中的System.Linq.Expressions.ExpressionVisitor类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Expressions.InvocationExpression类代码示例发布时间:2022-05-26
下一篇:
C# Expressions.ExpressionTreeVisitor类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap