使用UsedImplicitlyAttribute 仍显示 ReSharper 警告
ReSharper 警告我未调用私有方法。它是通过反射调用的,所以我不想删除该方法,并且(部分)为此目的设计了 UsedImplicitlyAttribute
。但即使在使用该属性装饰该方法之后,ReSharper 仍然警告我。这看起来像是一个错误,但也许我错过了一些选项(ReSharper 的选项并不少)。有谁知道我该如何解决这个问题?构建项目没有成功。
ReSharper warns me about a private method not being called. It is called through reflection, so I don't want to delete the method, and (partly) for this purpose UsedImplicitlyAttribute
was designed. But ReSharper still warns me, even after decorating the method with that attribute. It seems like a bug, but perhaps I'm missing some option (ReSharper doesn't have too few of those). Does anyone have a clue how I can fix that? Building the project didn't work.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我假设您已阅读有关如何合并代码注释项的文档到您自己的代码中。我过去发现 R# 的这部分选项可能有点不稳定:
有时,您复制声明的名称空间出现在列表中之前,有时需要多次访问此页面。但一旦完成,并且勾选了复选框,它就应该可以工作了。
I'm going to assume you've read the documentation on how to incorporate the Code Annotations items into your own code. I have found in the past that R# can be a little flaky with this part of the options:
It sometimes takes more than one visit to this page before the namespace that you've copied the declarations into appears in the list. But once it does, and you tick the checkbox, it should all then work.