CSharpCompilation.WithReferences Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
WithReferences(IEnumerable<MetadataReference>) |
Creates a new compilation with the specified references. |
WithReferences(MetadataReference[]) |
Creates a new compilation with the specified references. |
WithReferences(IEnumerable<MetadataReference>)
- Source:
- CSharpCompilation.cs
- Source:
- CSharpCompilation.cs
- Source:
- CSharpCompilation.cs
- Source:
- CSharpCompilation.cs
- Source:
- CSharpCompilation.cs
- Source:
- CSharpCompilation.cs
- Source:
- CSharpCompilation.cs
- Source:
- CSharpCompilation.cs
- Source:
- CSharpCompilation.cs
- Source:
- CSharpCompilation.cs
- Source:
- CSharpCompilation.cs
- Source:
- CSharpCompilation.cs
- Source:
- CSharpCompilation.cs
- Source:
- CSharpCompilation.cs
- Source:
- CSharpCompilation.cs
- Source:
- CSharpCompilation.cs
- Source:
- CSharpCompilation.cs
- Source:
- CSharpCompilation.cs
- Source:
- CSharpCompilation.cs
- Source:
- CSharpCompilation.cs
- Source:
- CSharpCompilation.cs
- Source:
- CSharpCompilation.cs
- Source:
- CSharpCompilation.cs
Creates a new compilation with the specified references.
public:
Microsoft::CodeAnalysis::CSharp::CSharpCompilation ^ WithReferences(System::Collections::Generic::IEnumerable<Microsoft::CodeAnalysis::MetadataReference ^> ^ references);
public Microsoft.CodeAnalysis.CSharp.CSharpCompilation WithReferences (System.Collections.Generic.IEnumerable<Microsoft.CodeAnalysis.MetadataReference> references);
public Microsoft.CodeAnalysis.CSharp.CSharpCompilation WithReferences (System.Collections.Generic.IEnumerable<Microsoft.CodeAnalysis.MetadataReference>? references);
override this.WithReferences : seq<Microsoft.CodeAnalysis.MetadataReference> -> Microsoft.CodeAnalysis.CSharp.CSharpCompilation
Public Function WithReferences (references As IEnumerable(Of MetadataReference)) As CSharpCompilation
Parameters
- references
- IEnumerable<MetadataReference>
Returns
Remarks
The new CSharpCompilation will query the given MetadataReference for the underlying metadata as soon as the are needed.
The new compilation uses whatever metadata is currently being provided by the MetadataReference. E.g. if the current compilation references a metadata file that has changed since the creation of the compilation the new compilation is going to use the updated version, while the current compilation will be using the previous (it doesn't change).
Applies to
WithReferences(MetadataReference[])
- Source:
- CSharpCompilation.cs
- Source:
- CSharpCompilation.cs
- Source:
- CSharpCompilation.cs
- Source:
- CSharpCompilation.cs
- Source:
- CSharpCompilation.cs
- Source:
- CSharpCompilation.cs
- Source:
- CSharpCompilation.cs
- Source:
- CSharpCompilation.cs
- Source:
- CSharpCompilation.cs
- Source:
- CSharpCompilation.cs
- Source:
- CSharpCompilation.cs
- Source:
- CSharpCompilation.cs
- Source:
- CSharpCompilation.cs
- Source:
- CSharpCompilation.cs
- Source:
- CSharpCompilation.cs
- Source:
- CSharpCompilation.cs
- Source:
- CSharpCompilation.cs
- Source:
- CSharpCompilation.cs
- Source:
- CSharpCompilation.cs
- Source:
- CSharpCompilation.cs
- Source:
- CSharpCompilation.cs
- Source:
- CSharpCompilation.cs
- Source:
- CSharpCompilation.cs
Creates a new compilation with the specified references.
public:
Microsoft::CodeAnalysis::CSharp::CSharpCompilation ^ WithReferences(... cli::array <Microsoft::CodeAnalysis::MetadataReference ^> ^ references);
public Microsoft.CodeAnalysis.CSharp.CSharpCompilation WithReferences (params Microsoft.CodeAnalysis.MetadataReference[] references);
override this.WithReferences : Microsoft.CodeAnalysis.MetadataReference[] -> Microsoft.CodeAnalysis.CSharp.CSharpCompilation
Public Function WithReferences (ParamArray references As MetadataReference()) As CSharpCompilation
Parameters
- references
- MetadataReference[]