Methods_T_Cyjb_Reflection_ILGeneratorUtil - CYJB/Cyjb GitHub Wiki

ILGeneratorUtil 方法

The ILGeneratorUtil type exposes the following members.

方法

 

名称 说明
公共方法静态成员 Emit 将指定的方法或构造函数的指定指令和元数据标记放到 Microsoft 中间语言 (MSIL) 指令流上。
公共方法静态成员 EmitCall(ILGenerator, MethodInfo) 调用指定的方法(call)。
公共方法静态成员 EmitCall(ILGenerator, MethodInfo, Boolean) 调用指定的方法(call)。
公共方法静态成员 EmitCall(ILGenerator, MethodInfo, Type[]) 调用指定的方法(call)。
公共方法静态成员 EmitCall(ILGenerator, Type, MethodInfo) 调用指定的方法(自动决定 call/callvirt)。
公共方法静态成员 EmitCall(ILGenerator, MethodInfo, Boolean, Type[]) 调用指定的方法(call)。
公共方法静态成员 EmitCall(ILGenerator, Type, MethodInfo, Boolean) 调用指定的方法(自动决定 call/callvirt)。
公共方法静态成员 EmitCall(ILGenerator, Type, MethodInfo, Type[]) 调用指定的方法(自动决定 call/callvirt)。
公共方法静态成员 EmitCall(ILGenerator, Type, MethodInfo, Boolean, Type[]) 调用指定的方法(自动决定 call/callvirt)。
公共方法静态成员 EmitConstant(ILGenerator, Boolean) 写入指定的 Boolean 常量。
公共方法静态成员 EmitConstant(ILGenerator, Byte) 写入指定的 Byte 常量。
公共方法静态成员 EmitConstant(ILGenerator, Char) 写入指定的 Char 常量。
公共方法静态成员 EmitConstant(ILGenerator, Decimal) 写入指定的 Decimal 常量。
公共方法静态成员 EmitConstant(ILGenerator, Double) 写入指定的 Double 常量。
公共方法静态成员 EmitConstant(ILGenerator, Int16) 写入指定的 Int16 常量。
公共方法静态成员 EmitConstant(ILGenerator, Int32) 写入指定的 Int32 常量。
公共方法静态成员 EmitConstant(ILGenerator, Int64) 写入指定的 Int64 常量。
公共方法静态成员 EmitConstant(ILGenerator, Object) 将指定的常量写入 IL 中。不能写入到 IL 中的常量(如自定义类)会使用闭包来实现。
公共方法静态成员 EmitConstant(ILGenerator, SByte) 写入指定的 SByte 常量。
公共方法静态成员 EmitConstant(ILGenerator, Single) 写入指定的 Single 常量。
公共方法静态成员 EmitConstant(ILGenerator, String) 写入指定的 String 常量。
公共方法静态成员 EmitConstant(ILGenerator, UInt16) 写入指定的 UInt16 常量。
公共方法静态成员 EmitConstant(ILGenerator, UInt32) 写入指定的 UInt32 常量。
公共方法静态成员 EmitConstant(ILGenerator, UInt64) 写入指定的 UInt64 常量。
公共方法静态成员 EmitConversion 将栈顶的对象从 inputType 转换为 outputType
公共方法静态成员 EmitEmptyArray 写入指定类型的空数组常量。
公共方法静态成员 EmitGetAddress 将栈顶的值转换为相应的地址。
公共方法静态成员 EmitInt 写入指定的 Int32 常量。
公共方法静态成员 EmitLoadArg(ILGenerator, Int32) 加载指定索引的参数。
公共方法静态成员 EmitLoadArg(ILGenerator, Int32, Type, Type) 加载指定索引的参数,并转换为指定类型。
公共方法静态成员 EmitLoadArg(ILGenerator, Int32, Type, Type, Boolean) 加载指定索引的参数,并转换为指定类型。
公共方法静态成员 EmitLoadArgAddress 加载指定索引的参数地址。
公共方法静态成员 EmitLoadElement 加载数组元素,要求已将数组对象和元素索引压入堆栈。
公共方法静态成员 EmitLoadField 写入加载字段值的指令。
公共方法静态成员 EmitLoadFieldAddress 写入加载字段地址的指令。
公共方法静态成员 EmitLoadIndirect 加载栈顶地址指向的值。
公共方法静态成员 EmitNew 使用指定类型的无参数构造函数创建实例。
公共方法静态成员 EmitStoreElement 替换数组元素,要求已将数组对象、元素索引和元素值压入堆栈。
公共方法静态成员 EmitStoreField 写入设置字段值的指令。
公共方法静态成员 FreeLocal 释放指定的局部变量,该局部变量之后可以被重复利用。
公共方法静态成员 GetClosure(ILGenerator) 返回当前的闭包。
公共方法静态成员 GetClosure(ILGenerator, Object) 返回指定闭包值的索引。
公共方法静态成员 GetConversion 获取转换类型的指令生成器,能够将栈顶的对象从 inputType 转换为 outputType
公共方法静态成员 GetLocal 返回可用的指定类型的局部变量。
  Back to Top

参见

Reference

ILGeneratorUtil 类
Cyjb.Reflection 命名空间

⚠️ **GitHub.com Fallback** ⚠️