public object Execute(Func <AopContext, object> invoke, AopContext context) { if (context.MethodInfo.GetCustomAttribute <JitAopAttribute>() != null) { return(context.Execute()); } return(invoke(context)); }
public async ValueTask InvokeValueAsync(Func <AopContext, ValueTask> invoke, AopContext context) { if (context.MethodInfo.GetCustomAttribute <JitAopAttribute>() != null) { await context.InvokeValueAsync(); } else { await invoke(context); } }
public async ValueTask <TResult> ExecuteValueAsync <TResult>(Func <AopContext, ValueTask <TResult> > invoke, AopContext context) { if (context.MethodInfo.GetCustomAttribute <JitAopAttribute>() != null) { return(await context.ExecuteValueAsync <TResult>()); } return(await invoke(context)); }
public object Execute(AopContext context) { return(context.Execute()); }
public Task InvokeAsync(AopContext context) { return(context.InvokeAsync()); }
public Task <TResult> ExecuteAsync <TResult>(AopContext context) { return(context.ExecuteAsync <TResult>()); }