Not sure if you are still interested since you post was several days ago. Even though Cecil doesn't create a DynamicMethod, LinFu.DynamicProxy uses Cecil to create proxies at runtime, which you may be interested in.
You may also be interested in Castle DynamicProxy's AST and code generators, which use Reflection.Emit and DefineDynamicAssembly, rather than emitting the IL yourself. On Wed, May 6, 2009 at 4:06 PM, Sergey Hakobyan <[email protected]>wrote: > > Thanks > > On May 5, 9:50 pm, Jb Evain <[email protected]> wrote: > > Hey, > > > > On 5/5/09, Sergey Hakobyan <[email protected]> wrote: > > > > > I'm new to Cecil, so before I dive too deep into it, I would like to > > > check if it supports creating dynamic methods in the running assembly > > > and calling them. Is it possible to create something like > > > DynamicMethod without using Relfection.Emit. And if yes, are there a > > > benefits to do so? > > > My usage scenario is LGC with DynamicMethod/Reflection.Emit for fast > > > property/field access instead of using slow MethodInfo.Invoke(), and I > > > was wondering if it can be accomplished by using Cecil. > > > > No it's not. A DynamicMethod is a very special kind of method, and is > > tightly tied to the runtime. > > > > -- > > Jb Evain <[email protected]> > > > -- Jono --~--~---------~--~----~------------~-------~--~----~ -- mono-cecil -~----------~----~----~----~------~----~------~--~---
