public MethodBodyVisitor(VBasic.VisualBasicSyntaxNode methodNode, SemanticModel semanticModel,
                                     VBasic.VisualBasicSyntaxVisitor <CSharpSyntaxNode> nodesVisitor, CommonConversions commonConversions,
                                     Stack <string> withBlockTempVariableNames, HashSet <string> extraUsingDirectives,
                                     AdditionalLocals additionalLocals, TriviaConverter triviaConverter)
            {
                _methodNode                 = methodNode;
                _semanticModel              = semanticModel;
                _nodesVisitor               = nodesVisitor;
                CommonConversions           = commonConversions;
                _withBlockTempVariableNames = withBlockTempVariableNames;
                _extraUsingDirectives       = extraUsingDirectives;
                var byRefParameterVisitor = new ByRefParameterVisitor(this, additionalLocals, semanticModel, _generatedNames);

                CommentConvertingVisitor = new CommentConvertingMethodBodyVisitor(byRefParameterVisitor, triviaConverter);
            }
Example #2
0
        public MethodBodyExecutableStatementVisitor(VBasic.VisualBasicSyntaxNode methodNode, SemanticModel semanticModel,
                                                    CommentConvertingVisitorWrapper <CSharpSyntaxNode> expressionVisitor, CommonConversions commonConversions,
                                                    Stack <ExpressionSyntax> withBlockLhs, HashSet <string> extraUsingDirectives,
                                                    AdditionalLocals additionalLocals, MethodsWithHandles methodsWithHandles,
                                                    TriviaConverter triviaConverter)
        {
            _methodNode           = methodNode;
            _semanticModel        = semanticModel;
            _expressionVisitor    = expressionVisitor;
            CommonConversions     = commonConversions;
            _withBlockLhs         = withBlockLhs;
            _extraUsingDirectives = extraUsingDirectives;
            _methodsWithHandles   = methodsWithHandles;
            var byRefParameterVisitor = new ByRefParameterVisitor(this, additionalLocals, semanticModel, _generatedNames);

            CommentConvertingVisitor = new CommentConvertingMethodBodyVisitor(byRefParameterVisitor, triviaConverter);
        }