public async Task Invoke(AspectContext context, global::AspectCore.DynamicProxy.AspectDelegate next)
        {
            var aspectInvocation = new AspectInvocation(
                context.ProxyMethod,
                context.ImplementationMethod,
                context.Proxy,
                context.Implementation,
                context.Parameters
                );

            if (FluentAspects.AspectOptions.NoInterceptionConfigurations.Any(x => x.Invoke(aspectInvocation)))
            {
                await next(context);
            }
            else
            {
                // ReSharper disable once ConvertToLocalFunction
                Func <IInvocation, Task> completeFunc = async c =>
                {
                    await next(context);

                    aspectInvocation.ReturnValue = context.ReturnValue;
                };
                AspectDelegate.InvokeWithCompleteFunc(aspectInvocation, completeFunc);
            }
        }
        public void Intercept(global::Castle.DynamicProxy.IInvocation invocation)
        {
            var proxyMethod      = invocation.GetConcreteMethod();
            var methodBase       = invocation.GetConcreteMethodInvocationTarget();
            var aspectInvocation = new AspectInvocation(
                proxyMethod,
                methodBase,
                invocation.Proxy,
                invocation.InvocationTarget,
                invocation.Arguments
                );

            var hasTarget = null != invocation.InvocationTarget &&
                            null != invocation.MethodInvocationTarget &&
                            null != invocation.TargetType;

            if (FluentAspects.AspectOptions.NoInterceptionConfigurations
                .Any(x => x.Invoke(aspectInvocation)))
            {
                invocation.Proceed();
            }
            else
            {
                Func <IInvocation, Task> completeFunc;
                if (hasTarget)
                {
                    completeFunc = c =>
                    {
                        invocation.Proceed();
                        c.ReturnValue = invocation.ReturnValue;
                        return(TaskHelper.CompletedTask);
                    };
                }
                else
                {
                    completeFunc = c => TaskHelper.CompletedTask;
                }
                AspectDelegate.InvokeWithCompleteFunc(aspectInvocation, completeFunc);
            }
        }