bool setDE(ConstantExpression left, ParameterExpression right) { if (_x.Equals(right)) { _list[3] = (BigInteger)left.Value; return(true); } if (_y.Equals(right)) { _list[4] = (BigInteger)left.Value; return(true); } return(false); }
protected override Expression VisitParameter(ParameterExpression node) { if (node.Equals(_parameter)) { return(this.Visit(_replacement)); } return(base.VisitParameter(node)); }
protected override Expression VisitParameter(ParameterExpression node) { if (node.Equals(this._paramToApply)) { return(Expression.Constant(_arg1, node.Type)); } return(base.VisitParameter(node)); }
protected override Expression VisitParameter(ParameterExpression parameter) { if (parameter.Equals(_parameterToReplace)) { return(_parameterReplacement); } return(base.VisitParameter(parameter)); }
protected override Expression VisitParameter(ParameterExpression node) { if (node.Equals(oldParam)) { return(newParam); } return(node); //return base.VisitParameter(node); }
public bool Equals(RuleParameter <T> other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return(_parameter.Equals(other._parameter)); }
public static bool MatchParameter(ParameterExpression e1, ParameterExpression e2, Substitution subst) { if (e1.Equals(e2)) { return(true); } ParameterExpression e = subst.Find(e1); return(e != null && e.Equals(e2)); }
/// <summary> /// Replace all occurences of a ParameterExpression within an expression tree with another ParameterExpression, and return a cloned tree /// </summary> /// <param name="expression">ParameterExpression to replace parameters in</param> /// <param name="oldParameter">Parameter to replace</param> /// <param name="newParameter">Parameter to use as replacement</param> /// <returns>A cloned expression tree with all occurences of oldParameter replaced with newParameter</returns> public static ParameterExpression ReplaceParameter(this ParameterExpression expression, ParameterExpression oldParameter, ParameterExpression newParameter) { ParameterExpression paramExpression = null; if (expression.Equals(oldParameter)) { paramExpression = newParameter; } else { paramExpression = expression; } return(paramExpression); }
/// <summary> /// Visit :: x => `x`.Customer.Name /// </summary> protected override Expression VisitParameter(ParameterExpression node) { _builder.Append(_rootParameter.Equals(node) ? "$" : "@"); return(base.VisitParameter(node)); }
protected override Expression VisitParameter(ParameterExpression node) { return(node.Equals(fromParameter) ? toParameter : base.VisitParameter(node)); }
protected override Expression VisitParameter(ParameterExpression node) { return(node.Equals(_originalParameter) ? _replacementParameter : base.VisitParameter(node)); }
protected override Expression VisitParameter(ParameterExpression node) { // Replace the source with the target, visit other params as usual. return(node.Equals(_source) ? _target : base.VisitParameter(node)); }
protected override Expression VisitParameter(ParameterExpression node) { return(node.Equals(_target) ? _replacement : node); }
protected override Expression VisitParameter(ParameterExpression node) { return(node.Equals(Original) ? Replacement : base.VisitParameter(node)); }