10 references to WithReferences
Microsoft.CodeAnalysis.InteractiveHost (1)
Interactive\Core\InteractiveHost.Service.cs (1)
569
WithReferences
(metadataReferences).
Microsoft.CodeAnalysis.Scripting (3)
Script.cs (1)
138
WithReferences
(ImmutableArray<MetadataReference>.Empty).
ScriptOptions.cs (2)
230
=>
WithReferences
((IEnumerable<MetadataReference>)references);
285
=>
WithReferences
(SelectChecked(references, nameof(references), CreateUnresolvedReference));
Microsoft.CodeAnalysis.Scripting.UnitTests (6)
ScriptOptionsTests.cs (6)
40
var options = ScriptOptions.Default.
WithReferences
(ImmutableArray<MetadataReference>.Empty);
63
var empty = ScriptOptions.Default.
WithReferences
(ImmutableArray<MetadataReference>.Empty);
82
var options = ScriptOptions.Default.
WithReferences
(ImmutableArray<MetadataReference>.Empty);
84
Assert.Throws<ArgumentNullException>("references", () => options.
WithReferences
((IEnumerable<MetadataReference>)null));
85
Assert.Throws<ArgumentNullException>("references", () => options.
WithReferences
(default(ImmutableArray<MetadataReference>)));
87
Assert.Throws<ArgumentNullException>("references[0]", () => options.
WithReferences
(ImmutableArray.Create((MetadataReference)null)));