Class CilAssembler
- Namespace
- AsmResolver.PE.DotNet.Cil
- Assembly
- AsmResolver.PE.dll
Provides a mechanism for encoding CIL instructions to an output stream.
public class CilAssembler
- Inheritance
-
CilAssembler
- Inherited Members
Constructors
CilAssembler(BinaryStreamWriter, ICilOperandBuilder)
Creates a new CIL instruction encoder.
public CilAssembler(BinaryStreamWriter writer, ICilOperandBuilder operandBuilder)
Parameters
writerBinaryStreamWriterThe output stream to write the encoded instructions to.
operandBuilderICilOperandBuilderThe object to use for creating raw operands.
CilAssembler(BinaryStreamWriter, ICilOperandBuilder, Func<string?>?, IErrorListener)
Creates a new CIL instruction encoder.
public CilAssembler(BinaryStreamWriter writer, ICilOperandBuilder operandBuilder, Func<string?>? getMethodBodyName, IErrorListener errorListener)
Parameters
writerBinaryStreamWriterThe output stream to write the encoded instructions to.
operandBuilderICilOperandBuilderThe object to use for creating raw operands.
getMethodBodyNameFunc<string>A delegate that is used for lazily obtaining the name of the method body.
errorListenerIErrorListenerThe object used for recording error listener.
CilAssembler(BinaryStreamWriter, ICilOperandBuilder, string?, IErrorListener)
Creates a new CIL instruction encoder.
public CilAssembler(BinaryStreamWriter writer, ICilOperandBuilder operandBuilder, string? methodBodyName, IErrorListener errorListener)
Parameters
writerBinaryStreamWriterThe output stream to write the encoded instructions to.
operandBuilderICilOperandBuilderThe object to use for creating raw operands.
methodBodyNamestringThe name of the method that is being serialized.
errorListenerIErrorListenerThe object used for recording error listener.
Methods
WriteInstruction(CilInstruction)
Writes a single instruction to the output stream.
public void WriteInstruction(CilInstruction instruction)
Parameters
instructionCilInstructionThe instruction to write.
WriteInstructions(IList<CilInstruction>)
Writes a collection of CIL instructions to the output stream.
public void WriteInstructions(IList<CilInstruction> instructions)
Parameters
instructionsIList<CilInstruction>The instructions to write.