public override DbExpression Visit(DbApplyExpression expression) { Check.NotNull(expression, "expression"); DbExpression result = expression; var newInput = VisitExpressionBindingEnterScope(expression.Input); var newApply = VisitExpressionBinding(expression.Apply); ExitScope(); if (!ReferenceEquals(expression.Input, newInput) || !ReferenceEquals(expression.Apply, newApply)) { if (DbExpressionKind.CrossApply == expression.ExpressionKind) { result = CqtBuilder.CrossApply(newInput, newApply); } else { Debug.Assert( expression.ExpressionKind == DbExpressionKind.OuterApply, "DbApplyExpression had ExpressionKind other than CrossApply or OuterApply?"); result = CqtBuilder.OuterApply(newInput, newApply); } } NotifyIfChanged(expression, result); return(result); }
/// <summary> /// Visitor pattern method for <see cref="T:System.Data.Entity.Core.Common.CommandTrees.DbApplyExpression" />. /// </summary> /// <param name="expression"> The DbApplyExpression that is being visited. </param> /// <exception cref="T:System.ArgumentNullException"> /// <paramref name="expression" /> /// is null /// </exception> public override void Visit(DbApplyExpression expression) { Check.NotNull <DbApplyExpression>(expression, nameof(expression)); this.VisitExpressionBindingPre(expression.Input); if (expression.Apply != null) { this.VisitExpression(expression.Apply.Expression); } this.VisitExpressionBindingPost(expression.Input); }
/// <summary> /// Visitor pattern method for <see cref="DbApplyExpression" />. /// </summary> /// <param name="expression"> The DbApplyExpression that is being visited. </param> /// <exception cref="ArgumentNullException"> /// <paramref name="expression" /> /// is null /// </exception> public override void Visit(DbApplyExpression expression) { Check.NotNull(expression, "expression"); VisitExpressionBindingPre(expression.Input); // #433613: PreSharp warning 56506: Parameter 'expression.Apply' to this public method must be validated: A null-dereference can occur here. if (expression.Apply != null) { VisitExpression(expression.Apply.Expression); } VisitExpressionBindingPost(expression.Input); }
/// <summary> /// When overridden in a derived class, implements the visitor pattern for /// <see /// cref="T:System.Data.Entity.Core.Common.CommandTrees.DbApplyExpression" /> /// . /// </summary> /// <returns>A result value of a specific type.</returns> /// <param name="expression"> /// The <see cref="T:System.Data.Entity.Core.Common.CommandTrees.DbApplyExpression" /> that is being visited. /// </param> public abstract TResultType Visit(DbApplyExpression expression);
/// <summary> /// When overridden in a derived class, implements the visitor pattern for /// <see cref="T:System.Data.Entity.Core.Common.CommandTrees.DbApplyExpression" /> /// . /// </summary> /// <param name="expression"> /// The <see cref="T:System.Data.Entity.Core.Common.CommandTrees.DbApplyExpression" /> that is visited. /// </param> public abstract void Visit(DbApplyExpression expression);
public override void Visit(DbApplyExpression expression) { }