Пример #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);
        }
Пример #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);
        }