本文整理汇总了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;未经允许,请勿转载。 |
请发表评论