我可以像这样将消息参数传递给 ICallHandler 实现吗:
var logic = container.Resolve<IBussinessLogic>(message);
并像这样使用它:
IMethodReturn ICallHandler.Invoke(IMethodInvocation input, GetNextHandlerDelegate getNext)
{
Console.WriteLine(
string.Format(
"Begin {0} with param {1}",
input.MethodBase.Name,
message // parameter I need to be passed
)
);
var result = getNext.Invoke()(input, getNext);
Console.WriteLine("End " + input.MethodBase.Name);
return result;
}
?