Is that how Db4o is doing field interception? Do they take the same approach?
I noticed that they make field interception so seamless that you don't even notice that your type has been modified. For example, take a look at this fixture: http://is.gd/EcPG There doesn't seem to be any code here that shows that the FieldSetterTestSubject class is being modified when the test is run, and yet, the test seems to show that the field is being intercepted--how is this possible? On Tue, May 26, 2009 at 3:41 PM, Jb Evain <[email protected]> wrote: > > Hey Philip, > > On 5/26/09, Philip_L <[email protected]> wrote: >> Is there any way to intercept direct access to fields using Cecil? >> Right now, I'm redirecting ldfield/stfield calls to an interceptor, >> and that seems to work well--but my question is this: is there a >> better way of doing this with the Cecil API? > > Nope, Cecil doesn't provide an interception API. Your approach is a > good one, injecting code around ldfld, stfld, ldsfld and stsfld. > > -- > Jb Evain <[email protected]> > > > > --~--~---------~--~----~------------~-------~--~----~ -- mono-cecil -~----------~----~----~----~------~----~------~--~---
