References Constructor

Definition

Initializes a new set of references based on the headers in refs and verifies that there are no conflicts.

public References (System.Collections.Immutable.ImmutableDictionary<string,Microsoft.Quantum.QsCompiler.CompilationBuilder.References.Headers> refs, bool loadTestNames = false, Action<Microsoft.Quantum.QsCompiler.Diagnostics.ErrorCode,string[]>? onError = default);
new Microsoft.Quantum.QsCompiler.CompilationBuilder.References : System.Collections.Immutable.ImmutableDictionary<string, Microsoft.Quantum.QsCompiler.CompilationBuilder.References.Headers> * bool * Action<Microsoft.Quantum.QsCompiler.Diagnostics.ErrorCode, string[]> -> Microsoft.Quantum.QsCompiler.CompilationBuilder.References
Public Sub New (refs As ImmutableDictionary(Of String, References.Headers), Optional loadTestNames As Boolean = false, Optional onError As Action(Of ErrorCode, String()) = Nothing)

Parameters

refs
ImmutableDictionary<String,References.Headers>

A dictionary that maps the ids of dll files to the corresponding headers.

loadTestNames
Boolean
onError
Action<ErrorCode,String[]>

Called with suitable diagnostics if two or more references conflict, i.e. if two or more references contain a declaration with the same fully qualified name.

Remarks

If loadTestNames is set to true, then public types and callables declared in referenced assemblies are exposed via their test name defined by the corresponding attribute.

Applies to