Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

关于闭包传参的问题 #4

Open
SuperSnowYao opened this issue Nov 11, 2019 · 0 comments
Open

关于闭包传参的问题 #4

SuperSnowYao opened this issue Nov 11, 2019 · 0 comments

Comments

@SuperSnowYao
Copy link

SuperSnowYao commented Nov 11, 2019

Object fallBackResult = fallBackMethod.Invoke(context.Implementation, context.Parameters);
在这行调用方法的代码中,如果像案例中那样,在外面while调用此注解,是没有任何问题的,因为name参数是一样的,这个参数问题暴露不出来。当改变参数调用的时候,此时委托中context.parameters的context应该用aspectContext,要不然在降级的方法中使用的参数仍然是原来的那个name值。例如如下:
image
如果不改,运行结果如下:
image
修改后,结果如下:
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant