// Used for rewrite of the nodes to either reuse existing set of variables if not rewritten.
 internal IList <ParameterExpression> ReuseOrValidateVariables(ReadOnlyCollection <ParameterExpression> variables)
 {
     if (variables != null && variables != VariablesList)
     {
         // Need to validate the new variables (uniqueness, not byref)
         ExpressionEx.ValidateVariables(variables, "variables");
         return(variables);
     }
     else
     {
         return(VariablesList);
     }
 }
        internal override Expression GetExpression(int index)
        {
            switch (index)
            {
            case 0: return(ExpressionEx.ReturnObject <Expression>(_arg0));

            case 1: return(_arg1);

            case 2: return(_arg2);

            default: throw new InvalidOperationException();
            }
        }
 internal override ReadOnlyCollection <Expression> GetOrMakeExpressions()
 {
     return(ExpressionEx.ReturnReadOnly(ref _body));
 }
 internal Scope1(IList <ParameterExpression> variables, Expression body)
     : base(variables, ExpressionEx.ReturnObject <Expression>(body).Type)
 {
     _body = body;
 }
 internal override ReadOnlyCollection <ParameterExpression> GetOrMakeVariables()
 {
     return(ExpressionEx.ReturnReadOnly(ref _variables));
 }