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;
}
}