Cecil 中是否有类似 Reflection.Emit.DynamicMethod 的东西?谢谢。
- 动态法
编辑:
下面的事情怎么办?
- EmitCall (例如
IL.EmitCall(OpCodes.Callvirt, GetBuildKey, null); IL.Emit(OpCodes.Unbox_Any, dependencyType); ) - LocalBuilder (例如 LocalBuilder 解析 = ilContext.IL.DeclareLocal(typeof(bool));)
- System.Reflection.Emit.Label (eg Label existingObjectNotNull = buildContext.IL.DefineLabel();) //一定要用TextMap吗?
- ILGenerator.BeginCatchBlock (例如 ilContext.IL.BeginCatchBlock(typeof(Exception)); )
- ILGenerator.MarkLabel (例如 ilContext.IL.MarkLabel(parameterResolveFailed); )
- ILGenerator.EndExceptionBlock() (例如 ilContext.IL.EndExceptionBlock(); )