如何使 ObjectListView 在混淆代码中工作? [英] How to make ObjectListView work in obfuscated code?

查看:63
本文介绍了如何使 ObjectListView 在混淆代码中工作?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

ObjectListView 停止工作.问题似乎集中在使用 AspectName 在 MainForm.designer.cs
中设置列例如:

ObjectListView stops working when i obfuscate the code. The issue seems to be centred around using AspectName to set the column in MainForm.designer.cs
E.g:

this.olvColumn1.AspectName = "Name";

混淆器可能会重命名我的所有方法.有关如何解决此问题的任何建议?

The Obfuscator could be renaming all my methods. Any advice on how to fix this issue?

推荐答案

AspectName 明显是使用了属性的名字,被混淆了.

AspectName is obviously using the name of the property, which is defeated by obfuscating.

你必须安装一个 AspectGetter 委托:

You'll have to install an AspectGetter delegate instead:

this.olvColumn1.AspectGetter = delegate(object x) {
    return ((YourModelClass)x).Name;
}

这篇关于如何使 ObjectListView 在混淆代码中工作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆