Passing data between Castle Windsor's Interceptors

Posted by Nhím H? Báo on Stack Overflow See other posts from Stack Overflow or by Nhím H? Báo
Published on 2012-10-26T10:17:36Z Indexed on 2012/10/26 11:01 UTC
Read the original article Hit count: 218

I'm adopting Castle Windsor for my WCF project and feel really amazed about this. However, I'm having a scenario that I don't really know if Castle Windsor supports. For example I have the following chained Interceptors

Interceptor 1 > Interceptor 2 > Interceptor 3 > Interceptor 4 > Real method

Interceptor 1 returns some data and I want that to be available in Interceptor 2 Interceptor 2 in turn does it work and returns the data that I want to make avaialbe in the 3,4, interceptor. The real case scenario is that we're having a WCF service, Interceptor 1 will parse the request header into a Header object(username, password, etc.). The latter interceptors and real method will ultilize this Header object. I know that I can use Session variable to transport data, but is it a built-in, more elegant, more reliable way to handle this?

© Stack Overflow or respective owner

Related posts about wcf

Related posts about dependency-injection