SyntaxTreeToQsharp.Apply Method

Definition

For each file in the given parameter array of open directives, generates a dictionary that maps (the name of) each partial namespace contained in the file to a string containing the formatted Q# code for the part of the namespace. Qualified or unqualified names for types and identifiers are generated based on the given namespace and open directives. -> IMPORTANT: The given namespace is expected to contain all elements in that namespace for the entire compilation unit!

public static bool Apply (out System.Collections.Generic.List<System.Collections.Immutable.ImmutableDictionary<string,string>> generatedCode, System.Collections.Generic.IEnumerable<Microsoft.Quantum.QsCompiler.SyntaxTree.QsNamespace> namespaces, params (string, System.Collections.Immutable.ImmutableDictionary<string,System.Collections.Immutable.ImmutableArray<(string, string)>>)[] openDirectives);
static member Apply : List * seq<Microsoft.Quantum.QsCompiler.SyntaxTree.QsNamespace> * ValueTuple<string, System.Collections.Immutable.ImmutableDictionary<string, System.Collections.Immutable.ImmutableArray<ValueTuple<string, string>>>>[] -> bool
Public Shared Function Apply (ByRef generatedCode As List(Of ImmutableDictionary(Of String, String)), namespaces As IEnumerable(Of QsNamespace), ParamArray openDirectives As ValueTuple(Of String, ImmutableDictionary(Of String, ImmutableArray(Of ValueTuple(Of String, String))))()) As Boolean

Parameters

namespaces
IEnumerable<QsNamespace>

Returns

Boolean

Applies to