10 references to WithReferences
Microsoft.CodeAnalysis.InteractiveHost (1)
Interactive\Core\InteractiveHost.Service.cs (1)
569WithReferences(metadataReferences).
Microsoft.CodeAnalysis.Scripting (3)
Script.cs (1)
138WithReferences(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)
40var options = ScriptOptions.Default.WithReferences(ImmutableArray<MetadataReference>.Empty); 63var empty = ScriptOptions.Default.WithReferences(ImmutableArray<MetadataReference>.Empty); 82var options = ScriptOptions.Default.WithReferences(ImmutableArray<MetadataReference>.Empty); 84Assert.Throws<ArgumentNullException>("references", () => options.WithReferences((IEnumerable<MetadataReference>)null)); 85Assert.Throws<ArgumentNullException>("references", () => options.WithReferences(default(ImmutableArray<MetadataReference>))); 87Assert.Throws<ArgumentNullException>("references[0]", () => options.WithReferences(ImmutableArray.Create((MetadataReference)null)));