AssemblyLoader.LoadSyntaxTree 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
| LoadSyntaxTree(Byte[], QsCompilation, Action<Exception>) |
Given a binary representation of compiled Q# code, returns the corresponding Q# compilation. |
| LoadSyntaxTree(Stream, QsCompilation, Action<Exception>) |
Obsolete.
Given a stream containing a binary representation of compiled Q# code, returns the corresponding Q# compilation. |
LoadSyntaxTree(Byte[], QsCompilation, Action<Exception>)
Given a binary representation of compiled Q# code, returns the corresponding Q# compilation.
public static bool LoadSyntaxTree (byte[] byteArray, out Microsoft.Quantum.QsCompiler.SyntaxTree.QsCompilation? compilation, Action<Exception>? onDeserializationException = default);
static member LoadSyntaxTree : byte[] * QsCompilation * Action<Exception> -> bool
Public Function LoadSyntaxTree (byteArray As Byte(), ByRef compilation As QsCompilation, Optional onDeserializationException As Action(Of Exception) = Nothing) As Boolean
Parameters
- byteArray
- Byte[]
A binary representation of compiled Q# code.
- compilation
- QsCompilation
The compilation deserialized from byteArray.
Called if an exception is thrown during deserialization.
Returns
True if the compilation could be deserialized without throwing an exception, and it is properly instantiated. False otherwise.
Applies to
LoadSyntaxTree(Stream, QsCompilation, Action<Exception>)
Caution
Only loads binary representations generated by compiler versions up to 0.13.20102604.
Given a stream containing a binary representation of compiled Q# code, returns the corresponding Q# compilation.
[System.Obsolete("Only loads binary representations generated by compiler versions up to 0.13.20102604.")]
public static bool LoadSyntaxTree (System.IO.Stream stream, out Microsoft.Quantum.QsCompiler.SyntaxTree.QsCompilation? compilation, Action<Exception>? onDeserializationException = default);
[<System.Obsolete("Only loads binary representations generated by compiler versions up to 0.13.20102604.")>]
static member LoadSyntaxTree : System.IO.Stream * QsCompilation * Action<Exception> -> bool
Public Function LoadSyntaxTree (stream As Stream, ByRef compilation As QsCompilation, Optional onDeserializationException As Action(Of Exception) = Nothing) As Boolean
Parameters
- stream
- Stream
A stream containing the binary representation of compiled Q# code.
- compilation
- QsCompilation
The compilation deserialized from stream.
Called if an exception is thrown during deserialization.
Returns
True if the compilation could be deserialized without throwing an exception, and it is properly instantiated. False otherwise.
- Attributes