【发布时间】:2011-10-07 12:19:08
【问题描述】:
我可以像这样将 message 参数传递给 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;
}
?
【问题讨论】:
标签: c# unity-container interception unity-interception