I wonder if there’s a way to use a castle interceptor to proxy a “SS service” (the custom class that handles a given operation, in other world the class that inherits from ServiceStack.Service).
Since services are not resolved by the custom IoC, I wonder if there’s a way to attach an interpetor to a SS service. I know there are several hooks for the service pipeline such as filters or a custom IServiceRunner, but i wonder if there’s a way to proxy the “Any” method(s) of a given service.
Services are pre-registered and autowired in Funq where it’s resolved from to execute each request. The invocations calling a Service are internally cached, compiled lambda expressions - we don’t provide external API’s to replace these delegate caches.
But there a number of hooks around Services including using a custom ServiceRunner there are also a number of hooks you can override in your AppHost to intercept the Request and Response, e.g:
OnPreExecuteServiceFilter
OnAfterExecute
OnPostExecuteServiceFilter
OnServiceException
Then there’s always having your Service inherit from a custom base Service class or one that implements IService.