Exemplo n.º 1
0
        public override void VisitAnonymousMethodExpression(AnonymousMethodExpression anonymousMethodExpression)
        {
            var capturedVariables = LambdaBlock.GetCapturedLoopVariables(Emitter, anonymousMethodExpression, anonymousMethodExpression.Parameters, true);

            if (capturedVariables != null)
            {
                DirectionVariables.AddRange(capturedVariables);
            }

            base.VisitAnonymousMethodExpression(anonymousMethodExpression);
        }
Exemplo n.º 2
0
        public override void VisitLambdaExpression(LambdaExpression lambdaExpression)
        {
            var capturedVariables = LambdaBlock.GetCapturedLoopVariables(Emitter, lambdaExpression, lambdaExpression.Parameters, true);

            if (capturedVariables != null)
            {
                DirectionVariables.AddRange(capturedVariables);
            }

            base.VisitLambdaExpression(lambdaExpression);
        }