예제 #1
0
        public SyntaxTree SingleFirstPass(Compilation sourceCompilation, SyntaxTree tree)
        {
            _sourceCompilation = sourceCompilation;
            var converted     = CSharpConverter.ConvertCompilationTree((CSharpCompilation)sourceCompilation, (CSharpSyntaxTree)tree);
            var convertedTree = VBSyntaxFactory.SyntaxTree(converted);

            _convertedCompilation = _convertedCompilation.AddSyntaxTrees(convertedTree);
            return(convertedTree);
        }
예제 #2
0
        public Compilation CreateCompilationFromTree(SyntaxTree tree, IEnumerable <MetadataReference> references)
        {
            VisualBasicCompilation withReferences = CreateVisualBasicCompilation(references, _rootNamespace);

            return(withReferences.AddSyntaxTrees(tree));
        }