C# Class NProxy.Core.Internal.Reflection.Emit.ILGeneratorExtensions

Provides ILGenerator extension methods.
Exibir arquivo Open project: mtamme/NProxy

Public Methods

Method Description
EmitBox ( this ilGenerator, Type type ) : void

Converts a value type to an object reference.

EmitCall ( this ilGenerator, MethodInfo methodInfo ) : void

Calls the specified method.

EmitLoadArgument ( this ilGenerator, int index ) : void

Loads an argument onto the stack.

EmitLoadArguments ( this ilGenerator, int offset, int count ) : void

Loads the arguments onto the stack.

EmitLoadIndirect ( this ilGenerator, Type type ) : void

Loads a value from an address.

EmitLoadValue ( this ilGenerator, int value ) : void

Loads a value onto the stack.

EmitStoreIndirect ( this ilGenerator, Type type ) : void

Stores a value to an address.

EmitUnbox ( this ilGenerator, Type type ) : void

Converts the boxed representation of a specified type to its unboxed form.

NewArray ( this ilGenerator, Type elementType, int size ) : LocalBuilder

Creates a new array of the specified element type.

ThrowException ( this ilGenerator, Type exceptionType, string message ) : void

Throws a new exception of the specified exception type.

Method Details

EmitBox() public static method

Converts a value type to an object reference.
public static EmitBox ( this ilGenerator, Type type ) : void
ilGenerator this The intermediate language generator.
type System.Type The type.
return void

EmitCall() public static method

Calls the specified method.
public static EmitCall ( this ilGenerator, MethodInfo methodInfo ) : void
ilGenerator this The intermediate language generator.
methodInfo System.Reflection.MethodInfo The method information.
return void

EmitLoadArgument() public static method

Loads an argument onto the stack.
public static EmitLoadArgument ( this ilGenerator, int index ) : void
ilGenerator this The intermediate language generator.
index int The argument index.
return void

EmitLoadArguments() public static method

Loads the arguments onto the stack.
public static EmitLoadArguments ( this ilGenerator, int offset, int count ) : void
ilGenerator this The intermediate language generator.
offset int The argument offset.
count int The argument count.
return void

EmitLoadIndirect() public static method

Loads a value from an address.
public static EmitLoadIndirect ( this ilGenerator, Type type ) : void
ilGenerator this The intermediate language generator.
type System.Type The type.
return void

EmitLoadValue() public static method

Loads a value onto the stack.
public static EmitLoadValue ( this ilGenerator, int value ) : void
ilGenerator this The intermediate language generator.
value int The value.
return void

EmitStoreIndirect() public static method

Stores a value to an address.
public static EmitStoreIndirect ( this ilGenerator, Type type ) : void
ilGenerator this The intermediate language generator.
type System.Type The type.
return void

EmitUnbox() public static method

Converts the boxed representation of a specified type to its unboxed form.
public static EmitUnbox ( this ilGenerator, Type type ) : void
ilGenerator this The intermediate language generator.
type System.Type The type.
return void

NewArray() public static method

Creates a new array of the specified element type.
public static NewArray ( this ilGenerator, Type elementType, int size ) : LocalBuilder
ilGenerator this The intermediate language generator.
elementType System.Type The element type.
size int The array size.
return System.Reflection.Emit.LocalBuilder

ThrowException() public static method

Throws a new exception of the specified exception type.
public static ThrowException ( this ilGenerator, Type exceptionType, string message ) : void
ilGenerator this The intermediate language generator.
exceptionType System.Type The exception type.
message string The error message.
return void