我想在一個特定的順序執行攔截器,我將它們綁定使用InterceptorAttribute這樣的類:城堡溫莎攔截器 - 訂單?
[Interceptor(typeof(type1))]
[Interceptor(typeof(type2))]
[Interceptor(typeof(type3))]
public class SomeClass {}
但不幸的是,它看起來像,而不是運行TYPE1攔截,那麼2型和3型,城堡以其他順序運行它們。我如何強制特定的訂單?可能嗎?
[更新]
我試圖與配置文件 - 它似乎工作,但我更喜歡的屬性,似乎更容易。
而不是使用攔截,請嘗試應用裝飾器。 – Steven 2013-04-01 15:17:00