Just make a check in the interceptor and don't do anything for anything else, that is the simplest approach, which has almost zero cost.In general, I would STRONGLY recommend against doing something like that in an interceptor, this is part of what the method is doing.
On Wed, Sep 3, 2008 at 8:47 PM, jsmorris <[EMAIL PROTECTED]> wrote: > > Is there a way to define an Interceptor to just intercept one action > on my controller? > > I have a need to start a background process to do some database > updates and would only like it to fire when a user hits the Index > action on my controller (instead of every method on the controller). > I thought I saw a blog post or something on the net about doing this, > but I cannot seem to find it again. > > Interceptors can only be defined at the class level and I poked around > the IInvocation that was passed to the Intercept method, but didn't > see an easy way to see which action(method) was called. > > I realize I can just put the code inside of the controller's method, > but seemed out of place and an Interceptor might be the better > solution to this scenario. > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Castle Project Users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/castle-project-users?hl=en -~----------~----~----~----~------~----~------~--~---
