DumpRule() private method

private DumpRule ( System.Runtime.CompilerServices.CallSiteBinder binder, BindingRestrictions restrictions, Expression expr ) : void
binder System.Runtime.CompilerServices.CallSiteBinder
restrictions BindingRestrictions
expr System.Linq.Expressions.Expression
return void
Example #1
0
        internal DynamicMetaObject /*!*/ CreateMetaObject(DynamicMetaObjectBinder /*!*/ binder, Type /*!*/ returnType)
        {
            Debug.Assert(ControlFlowBuilder == null, "Control flow required but not built");

            var restrictions = _restrictions;
            var expr         = _error ? Ast.Throw(_result, returnType) : AstUtils.Convert(_result, returnType);

            if (_condition != null)
            {
                var deferral = binder.GetUpdateExpression(returnType);
                expr = Ast.Condition(_condition, expr, deferral);
            }

            if (_temps != null || _initializations != null)
            {
                AddInitialization(expr);
                if (_temps != null)
                {
                    expr = Ast.Block(_temps, _initializations);
                }
                else
                {
                    expr = Ast.Block(_initializations);
                }
            }

            Clear();
            RubyBinder.DumpRule(binder, restrictions, expr);
            return(new DynamicMetaObject(expr, restrictions));
        }