[Mono-devel-list] Trigger some internal action based on attributes for a method?

Bas Westerbaan bas.westerbaan at gmail.com
Mon Jun 27 16:33:34 EDT 2005


This could be done by as suggested using attributes and a post-processor 
which modifies the assembly.

On 6/27/05, Jose Cornado <jose.cornado at gmail.com> wrote:
> 
> This is kind of a shot in the dark:
> 
> What about using round tripping?
> 
> You do not want the users to customize their methods but what about
> you adding a couple of IL instructions to their "standard" methods to
> make the extra call.
> 
> On 6/27/05, Okehee Goh <okehee at gmail.com> wrote:
> > I wonder how I can support this:
> > When a method is entered and starts executing ,
> > I'd like to implicitly call another method or an internal
> > function defined inside of CLR
> > (What I'd like to do is to notify CLR certain information telling that
> > the method being executed now is the one CLR should monitor..)
> >
> > Seems there is 'hook' approach.
> > But I don't want users to customize their methods into certain format
> > in order to insert the hook.
> >
> > So, I checked out Attributes because users can simply add
> > corresponding attribute in front of the method definition. But, seems
> > that the metadata information declared through Attribute is accessed
> > through reflection in managed code only. Users' managed code calls
> > some reflection to ask the type of attribute.
> > However, is there a way that CLR internal can use the attribute like
> > hook function?
> >
> > If Attributes are not proper for that, how about event listener?
> >
> > I searched the archive of the mailing list. There was a mail-thread
> > "Implementing attribute-based code generation" in Jan. I wonder
> > whether there has been evolved activities for that since that?
> >
> > Regards,
> > _______________________________________________
> > Mono-devel-list mailing list
> > Mono-devel-list at lists.ximian.com
> > http://lists.ximian.com/mailman/listinfo/mono-devel-list
> >
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list
> 



-- 
Bas Westerbaan
http://blog.w-nz.com/
GPG Public Keys: http://w-nz.com/keys/bas.westerbaan.asc
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20050627/c4f4fa0e/attachment.html 


More information about the Mono-devel-list mailing list