Modifies the context and emits the binary representation of this emittable to the specified BinaryWriter.

Namespace: SharpAssembler.Core
Assembly: SharpAssembler Core (in SharpAssembler Core.dll) Version: 1.0.0.0 (1.0.0.0)

Syntax

C#
int Emit(
	BinaryWriter writer,
	Context context
)
Visual Basic
Function Emit ( _
	writer As BinaryWriter, _
	context As Context _
) As Integer
Visual C++
int Emit(
	BinaryWriter^ writer, 
	Context^ context
)

Parameters

writer
Type: System.IO..::..BinaryWriter
The BinaryWriter to which the encoded instruction is written.
context
Type: SharpAssembler.Core..::..Context
The Context in which the emittable will be emitted.

Return Value

The number of emitted bytes.

Exceptions

ExceptionCondition
System..::..ArgumentNullExceptioncontext == null
System..::..ArgumentNullExceptionwriter == null

Contracts

Requires
context != null
writer != null
Ensures
Contract.Result<int>() >= 0

See Also