예제 #1
0
        public object Execute(Func <AopContext, object> invoke, AopContext context)
        {
            if (context.MethodInfo.GetCustomAttribute <JitAopAttribute>() != null)
            {
                return(context.Execute());
            }

            return(invoke(context));
        }
예제 #2
0
 public async ValueTask InvokeValueAsync(Func <AopContext, ValueTask> invoke, AopContext context)
 {
     if (context.MethodInfo.GetCustomAttribute <JitAopAttribute>() != null)
     {
         await context.InvokeValueAsync();
     }
     else
     {
         await invoke(context);
     }
 }
예제 #3
0
        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));
        }
예제 #4
0
 public object Execute(AopContext context)
 {
     return(context.Execute());
 }
예제 #5
0
 public Task InvokeAsync(AopContext context)
 {
     return(context.InvokeAsync());
 }
예제 #6
0
 public Task <TResult> ExecuteAsync <TResult>(AopContext context)
 {
     return(context.ExecuteAsync <TResult>());
 }