NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

ILGenerator Methods

The methods of the ILGenerator class are listed below. For a complete list of ILGenerator class members, see the ILGenerator Members topic.

Public:

BeginCatchBlock Begins a catch block. Emits a branch instruction to the end of the current exception block.
BeginExceptFilterBlock Begins an exception block for a filtered exception.
BeginExceptionBlock Begins an exception block for a non-filtered exception.
BeginFaultBlock Begins an exception fault block on the instruction stream.
BeginFinallyBlock Begins a finally block on the instruction stream.
BeginScope Begins a lexical scope.
DeclareLocal Declares a local variable.
DefineLabel Declares a new Label. This is just a token and does not yet represent any particular location within the stream.
Emit Overloaded. Puts an instruction onto the instruction stream for the JIT compiler. If the opcode requires an argument, the caller must ensure that the argument length matches the length of the declared parameter. Otherwise, results will be unpredictable. For example, if the Emit instruction requires a 2-byte operand and the caller supplies a 4-byte operand, the runtime will emit two additional bytes to the instruction stream. These extra bytes will be Opcodes.Nop instructions.
EmitCall Puts a call or callvirt instruction onto the IL stream.
EmitCalli Puts a calli instruction onto the IL stream.
EmitWriteLine Overloaded. [To be supplied.]
EndExceptionBlock Ends an exception block.
EndScope Ends a lexical scope.
Equals (inherited from Object) Determines whether the specified Object is the same instance as the current Object. Subclasses are expected to override this method to support value equality (not reference equality).
GetHashCode (inherited from Object) Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetType (inherited from Object) Gets the Type of the Object.
MarkLabel Defines a label by setting the position where that label is found within the stream.
MarkSequencePoint Marks a sequence point in the instruction stream.
ThrowException Emits an instruction to throw an exception.
ToString (inherited from Object) Returns a String that represents the current Object.
UsingNamespace [To be supplied.]

Protected:

Finalize (inherited from Object) Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by the Garbage Collector (GC). This method may be ignored by the runtime; therefore, necessary cleanup operations should be done elsewhere.
MemberwiseClone (inherited from Object) Creates a shallow copy of the current Object.

See Also

ILGenerator Class | System.Reflection.Emit Namespace