public static ExecuteResult Execute(this IRoutine routine, SqlExpression[] args, IQueryContext context, IVariableResolver resolver, IGroupResolver group) { var request = new Invoke(routine.FullName, args); if (context != null && !context.UserCanExecuteFunction(request)) throw new InvalidOperationException(); var executeContext = new ExecuteContext(request, routine, resolver, group, context); return routine.Execute(executeContext); }