70 references to WithGlobalImports
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (2)
Workspaces\TestWorkspace_XmlConsumption.cs (2)
663
: new VisualBasicCompilationOptions(OutputKind.WindowsRuntimeMetadata).
WithGlobalImports
(globalImports).WithRootNamespace(rootNamespace)
699
.
WithGlobalImports
(globalImports)
Microsoft.CodeAnalysis.VisualBasic (1)
VisualBasicCompilationOptions.vb (1)
554
Return
WithGlobalImports
(DirectCast(globalImports, IEnumerable(Of GlobalImport)))
Microsoft.CodeAnalysis.VisualBasic.Emit.UnitTests (12)
CodeGen\CodeGenVBCore.vb (1)
2775
Dim compilationOptions = TestOptions.ReleaseExe.
WithGlobalImports
(GlobalImport.Parse({"System", "Microsoft.VisualBasic"}))
PDB\PDBNamespaceScopes.vb (3)
105
TestOptions.DebugExe.
WithGlobalImports
(globalImports).WithRootNamespace(""))
277
TestOptions.DebugExe.
WithGlobalImports
(globalImports).WithRootNamespace("DefaultNamespace"))
467
Dim compilation = CreateCompilationWithMscorlib40AndReferences(source, {libRef}, options:=TestOptions.DebugDll.
WithGlobalImports
(globalImports))
XmlLiteralTests.vb (8)
1134
Dim options = TestOptions.ReleaseExe.
WithGlobalImports
(GlobalImport.Parse({"<xmlns=""default1"">", "<xmlns:p=""p1"">", "<xmlns:q=""q1"">"}))
1239
Dim options = TestOptions.ReleaseExe.
WithGlobalImports
(GlobalImport.Parse({"<xmlns=""http://roslyn"">", "<xmlns:p=""http://roslyn/p"">"}))
2644
Dim options = TestOptions.ReleaseDll.
WithGlobalImports
(GlobalImport.Parse({"<xmlns:p=<%= <p:x/>.@y %>>"}))
2868
Assert.Throws(Of ArgumentException)(Sub() TestOptions.ReleaseDll.
WithGlobalImports
(GlobalImport.Parse({"<xmlns:p=""..."""})))
2869
Assert.Throws(Of ArgumentException)(Sub() TestOptions.ReleaseDll.
WithGlobalImports
(GlobalImport.Parse({"<xmlns:p=""..."">, <xmlns:q=""..."""})))
4156
Dim options = TestOptions.ReleaseDll.
WithGlobalImports
(GlobalImport.Parse({"<xmlns:p=""http://roslyn"">"}))
4336
Dim options = TestOptions.ReleaseExe.
WithGlobalImports
(GlobalImport.Parse({"<xmlns:r=""http://roslyn/"">", "<xmlns:s=""http://roslyn/"">"}))
4532
Dim options = TestOptions.DebugDll.
WithGlobalImports
([imports])
Microsoft.CodeAnalysis.VisualBasic.ExpressionEvaluator.ExpressionCompiler.UnitTests (3)
ImportDebugInfoTests.vb (3)
142
Dim options As VisualBasicCompilationOptions = TestOptions.ReleaseDll.WithRootNamespace("root").
WithGlobalImports
(GlobalImport.Parse(
386
Dim options As VisualBasicCompilationOptions = TestOptions.ReleaseDll.WithRootNamespace("root").
WithGlobalImports
(GlobalImport.Parse(
545
Dim options As VisualBasicCompilationOptions = TestOptions.ReleaseDll.WithRootNamespace("root").
WithGlobalImports
(GlobalImport.Parse(
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (18)
Binding\BindingErrorTests.vb (5)
3390
Dim options = TestOptions.ReleaseDll.
WithGlobalImports
(GlobalImport.Parse({"<xmlns:p1=""..."">"}))
12657
Dim options = TestOptions.ReleaseDll.
WithGlobalImports
(GlobalImport.Parse({"<xmlns:p=""http://roslyn/p"">"}))
12804
Dim options = TestOptions.ReleaseDll.
WithGlobalImports
(GlobalImport.Parse({"<xmlns:p=<%= M1.F %>>"}))
12833
Dim options = TestOptions.ReleaseDll.
WithGlobalImports
(GlobalImport.Parse({"<xmlns=""http://www.w3.org/XML/1998/namespace"">", "<xmlns:p1=""http://www.w3.org/2000/xmlns/"">"}))
12869
Dim options = TestOptions.ReleaseDll.
WithGlobalImports
(GlobalImport.Parse({"<xmlns="""">", "<xmlns:p="""">"}))
Compilation\CompilationAPITests.vb (1)
300
Dim ops1 = TestOptions.ReleaseExe.
WithGlobalImports
(GlobalImport.Parse({"System", "Microsoft.VisualBasic"})).WithRootNamespace("")
Compilation\GetImportScopesTests.vb (1)
504
Return TestOptions.ReleaseDll.
WithGlobalImports
(
Compilation\VisualBasicCompilationOptionsTests.vb (2)
166
Assert.Equal(0, New VisualBasicCompilationOptions(OutputKind.ConsoleApplication).WithGlobalImports(GlobalImport.Parse("Goo.Bar")).
WithGlobalImports
(DirectCast(Nothing, IEnumerable(Of GlobalImport))).GlobalImports.Count)
348
Dim opt = New VisualBasicCompilationOptions(OutputKind.ConsoleApplication).
WithGlobalImports
(GlobalImport.Parse(importStrings))
ExtensionMethods\SemanticModelTests.vb (9)
400
</compilation>, options:=TestOptions.ReleaseExe.
WithGlobalImports
(GlobalImport.Parse({"NS4.Module7", "NS4"})))
527
</compilation>, options:=TestOptions.ReleaseExe.
WithGlobalImports
(GlobalImport.Parse({"NS4.Module7", "NS4"})))
648
</compilation>, options:=TestOptions.ReleaseExe.
WithGlobalImports
(GlobalImport.Parse({"NS4.Module7", "NS4"})))
771
</compilation>, options:=TestOptions.ReleaseExe.
WithGlobalImports
(GlobalImport.Parse({"NS4.Module7", "NS4"})))
900
</compilation>, options:=TestOptions.ReleaseExe.
WithGlobalImports
(GlobalImport.Parse({"NS4.Module7", "NS4"})))
1033
</compilation>, options:=TestOptions.ReleaseExe.
WithGlobalImports
(GlobalImport.Parse({"NS4.Module7", "NS4"})))
1159
</compilation>, options:=TestOptions.ReleaseExe.
WithGlobalImports
(GlobalImport.Parse({"NS4.Module7", "NS4"})))
1275
</compilation>, options:=TestOptions.ReleaseExe.
WithGlobalImports
(GlobalImport.Parse({"NS4.Module7", "NS4"})))
1463
</compilation>, options:=TestOptions.ReleaseExe.
WithGlobalImports
(GlobalImport.Parse({"alias1 = System"})))
Microsoft.CodeAnalysis.VisualBasic.Symbol.UnitTests (32)
SymbolsTests\ExtensionMethods\LookupAndInvocation.vb (9)
124
options:=TestOptions.ReleaseExe.
WithGlobalImports
(GlobalImport.Parse({"NS4.Module7", "NS4"})),
235
options:=TestOptions.ReleaseExe.
WithGlobalImports
(GlobalImport.Parse({"NS4.Module7", "NS4"})),
345
options:=TestOptions.ReleaseExe.
WithGlobalImports
(GlobalImport.Parse({"NS4.Module7", "NS4"})),
454
options:=TestOptions.ReleaseExe.
WithGlobalImports
(GlobalImport.Parse({"NS4.Module7", "NS4"})),
562
options:=TestOptions.ReleaseExe.
WithGlobalImports
(GlobalImport.Parse({"NS4.Module7", "NS4"})),
669
options:=TestOptions.ReleaseExe.
WithGlobalImports
(GlobalImport.Parse({"NS4.Module7", "NS4"})),
775
options:=TestOptions.ReleaseExe.
WithGlobalImports
(GlobalImport.Parse({"NS4.Module7", "NS4"})),
880
options:=TestOptions.ReleaseExe.
WithGlobalImports
(GlobalImport.Parse({"NS4.Module7", "NS4"})),
984
TestOptions.ReleaseExe.
WithGlobalImports
(GlobalImport.Parse({"NS4.Module7", "NS4"})))
SymbolsTests\Source\TypeBindingTests.vb (4)
603
Dim options = TestOptions.ReleaseDll.
WithGlobalImports
(GlobalImport.Parse(
721
Dim options = TestOptions.ReleaseExe.
WithGlobalImports
(GlobalImport.Parse(
1045
Dim options = TestOptions.ReleaseDll.
WithGlobalImports
(GlobalImport.Parse(
1133
Dim options = TestOptions.ReleaseExe.
WithGlobalImports
(GlobalImport.Parse(
SymbolsTests\SymbolErrorTests.vb (9)
5997
Dim options = TestOptions.ReleaseExe.
WithGlobalImports
(GlobalImport.Parse({"N1", "N2"}))
6027
Dim options = TestOptions.ReleaseExe.
WithGlobalImports
(GlobalImport.Parse({"N1", "N2"}))
6107
Dim options = TestOptions.ReleaseDll.
WithGlobalImports
(GlobalImport.Parse({"<xmlns=""default1"">", "<xmlns=""default2"">", "<xmlns:p=""p1"">", "<xmlns:q=""q"">", "<xmlns:p=""p2"">"}))
9479
</compilation>, options:=New VisualBasicCompilationOptions(OutputKind.DynamicallyLinkedLibrary).
WithGlobalImports
(
9502
</compilation>, options:=New VisualBasicCompilationOptions(OutputKind.DynamicallyLinkedLibrary).
WithGlobalImports
(
15217
Dim options = TestOptions.ReleaseDll.
WithGlobalImports
(GlobalImport.Parse({"N.A(Of Object).B(Of String)", "C=N.A(Of N.B).B(Of Object)"}))
19707
Dim options = TestOptions.ReleaseExe.
WithGlobalImports
(globalImports)
20762
Dim options = TestOptions.ReleaseDll.
WithGlobalImports
(globalImports)
23894
Dim options = TestOptions.ReleaseDll.
WithGlobalImports
(GlobalImport.Parse({"GlobEnumsClass"}))
UsedAssembliesTests.vb (10)
2040
Dim comp As Compilation = CreateCompilation(source, references:={reference}, options:=TestOptions.DebugDll.
WithGlobalImports
(globalImports))
3041
Dim options = TestOptions.DebugDll.
WithGlobalImports
(globalImports)
3663
TestOptions.DebugDll.
WithGlobalImports
(GlobalImport.Parse({"C2.C1"})).
3675
TestOptions.DebugDll.
WithGlobalImports
(GlobalImport.Parse({"alias1 = C2.C1"})).
4031
options:=TestOptions.DebugDll.
WithGlobalImports
(GlobalImport.Parse({"N1.N2"}))),
4035
options:=TestOptions.DebugDll.
WithGlobalImports
(GlobalImport.Parse({"N1.N2"}))),
4039
options:=TestOptions.DebugDll.
WithGlobalImports
(GlobalImport.Parse({"N1"}))),
4043
options:=TestOptions.DebugDll.
WithGlobalImports
(GlobalImport.Parse({"N1"}))),
4218
options:=TestOptions.DebugDll.
WithGlobalImports
(GlobalImport.Parse({"N1.N2.E0"}))),
4222
options:=TestOptions.DebugDll.
WithGlobalImports
(GlobalImport.Parse({"N1.N2.E0"}))),
Microsoft.CodeAnalysis.VisualBasic.Workspaces.UnitTests (1)
CodeGeneration\AddImportsTests.vb (1)
43
project = project.WithCompilationOptions(DirectCast(project.CompilationOptions, VisualBasicCompilationOptions).
WithGlobalImports
(gi))
Microsoft.VisualStudio.LanguageServices.VisualBasic (1)
ProjectSystemShim\VisualBasicProject.OptionsProcessor.vb (1)
55
.
WithGlobalImports
(_imports)