public override void VisitAnonymousMethodExpression(AnonymousMethodExpression anonymousMethodExpression) { var capturedVariables = LambdaBlock.GetCapturedLoopVariables(Emitter, anonymousMethodExpression, anonymousMethodExpression.Parameters, true); if (capturedVariables != null) { DirectionVariables.AddRange(capturedVariables); } base.VisitAnonymousMethodExpression(anonymousMethodExpression); }
public override void VisitLambdaExpression(LambdaExpression lambdaExpression) { var capturedVariables = LambdaBlock.GetCapturedLoopVariables(Emitter, lambdaExpression, lambdaExpression.Parameters, true); if (capturedVariables != null) { DirectionVariables.AddRange(capturedVariables); } base.VisitLambdaExpression(lambdaExpression); }