0
にキャストする方法引数を含むAction
クラスとしてメソッド呼び出しをキャストする方法はありますか?それも可能ですか?城ウィンザー - メソッドを傍受し、それをアクションクラス
Queue<Action> queue = new Queue<Action>();
傍受されるためのサンプル方法:
public string DoSomeStuff(string[] arr)
{
//some logic here
}
インターセプター(城ウィンザー):
public class MyInterceptor : IInterceptor
{
public void Intercept(IInvocation invocation)
{
if (queue.Count > 0)
{
queue.Enqueue(() => {
//here, add intercepted method (DoSomeStuff) and its parameters
});
}
}
}