private RunArgumentHook ( PowerArgs.ArgHook context, int>.Func |
||
context | PowerArgs.ArgHook | |
orderby | int>.Func | |
hookAction | Action |
|
Результат | void |
internal void RunArgumentHook(ArgHook.HookContext context, Func<ArgHook, int> orderby, Action<ArgHook> hookAction)
{
var oldCurrent = context.CurrentArgument;
try
{
context.Property = Source as PropertyInfo;
context.CurrentArgument = this;
foreach (var hook in Hooks.OrderBy(orderby))
{
hookAction(hook);
}
context.Property = null;
}
finally
{
context.CurrentArgument = oldCurrent;
}
}