RuntimeVariables() public static method

Creates an instance of RuntimeVariablesExpression.
public static RuntimeVariables ( ) : RuntimeVariablesExpression
return RuntimeVariablesExpression
示例#1
0
 /// <summary>
 /// Creates a new expression that is like this one, but using the
 /// supplied children. If all of the children are the same, it will
 /// return this expression.
 /// </summary>
 /// <param name="variables">The <see cref="Variables" /> property of the result.</param>
 /// <returns>This expression if no children changed, or an expression with the updated children.</returns>
 public RuntimeVariablesExpression Update(IEnumerable <ParameterExpression> variables)
 {
     if (variables == Variables)
     {
         return(this);
     }
     return(Expression.RuntimeVariables(variables));
 }
        public void RuntimeVariables()
        {
            var expression =
                LinqExpression.RuntimeVariables(
                    LinqExpression.Parameter(
                        typeof(object)));

            ShouldRoundrip(expression);
        }
示例#3
0
        protected internal virtual Expression VisitRuntimeVariables(RuntimeVariablesExpression node)
        {
            var v = VisitAndConvert(node.Variables, "VisitRuntimeVariables");

            if (v == node.Variables)
            {
                return(node);
            }
            return(Expression.RuntimeVariables(v));
        }
        private RuntimeVariablesExpression RuntimeVariablesExpression(ExpressionType nodeType, System.Type type, JObject obj)
        {
            var variables = this.Prop(obj, "variables", this.Enumerable(this.ParameterExpression));

            switch (nodeType)
            {
            case ExpressionType.RuntimeVariables:
                return(Expr.RuntimeVariables(variables));

            default:
                throw new NotSupportedException();
            }
        }