10 references to WithImports
Microsoft.CodeAnalysis.CSharp.Scripting.UnitTests (2)
InteractiveSessionTests.cs (2)
1176
1 + 1", ScriptOptions.
WithImports
("System"));
1342
ScriptOptions.WithReferences(libRef.WithAliases(new[] { "Hidden" })).
WithImports
("Hidden::N"));
Microsoft.CodeAnalysis.Scripting (1)
Hosting\CommandLine\CommandLineHelpers.cs (1)
22
return options.WithReferences(Array.Empty<MetadataReference>()).
WithImports
(Array.Empty<string>());
Microsoft.CodeAnalysis.Scripting.UnitTests (7)
ScriptOptionsTests.cs (7)
143
Assert.Throws<ArgumentNullException>("imports", () => options.
WithImports
((string[])null));
144
Assert.Throws<ArgumentNullException>("imports[0]", () => options.
WithImports
([null]));
153
options.
WithImports
("");
154
options.
WithImports
("blah.");
155
options.
WithImports
("b\0lah");
156
options.
WithImports
(".blah");
162
var scriptOptions = ScriptOptions.Default.
WithImports
(["System", "System.IO"]);