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); }
public Compilation CreateCompilationFromTree(SyntaxTree tree, IEnumerable <MetadataReference> references) { VisualBasicCompilation withReferences = CreateVisualBasicCompilation(references, _rootNamespace); return(withReferences.AddSyntaxTrees(tree)); }