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

补丁里能否新增方法, 如果可以, 应该如何操作? #54

Closed
EmmaSoung opened this issue Nov 19, 2019 · 7 comments
Closed

补丁里能否新增方法, 如果可以, 应该如何操作? #54

EmmaSoung opened this issue Nov 19, 2019 · 7 comments

Comments

@EmmaSoung
Copy link

InjectFix, 补丁里不能新添加方法吗 ? 编辑下会报错"can't load ......"

@chexiongsheng
Copy link
Collaborator

在新增方法上打Interpret标签

@EmmaSoung
Copy link
Author

Got it ! Thanks

@cn00
Copy link

cn00 commented Nov 19, 2019

看代码像是在配置列表打Interpret标签吧

@EmmaSoung
Copy link
Author

看代码像是在配置列表打Interpret标签吧

Clever, 赞!

@cn00
Copy link

cn00 commented Nov 19, 2019

方法上打Interpret标签好像不好使,还在试😂

@cn00
Copy link

cn00 commented Nov 19, 2019

我的情况是有个成员函数线上版本在范型基类里,实例化子类没有,patch 不了,现在想在子类里加上 override 不知有什么方法

@chexiongsheng
Copy link
Collaborator

我的情况是有个成员函数线上版本在范型基类里,实例化子类没有,patch 不了,现在想在子类里加上 override 不知有什么方法

新增方法支持,新增方法override父类不支持。
感觉你直接改基类好了。
if(this.GetType() == typeof("子类") {
子类逻辑;
} else {
原来逻辑;
}

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

3 participants