如何将 SPDisposeCheckIgnore 的声明添加到您的项目中?
我已经安装了 SPDispose,并且收到了一些关于
SPWeb web = SPContext.Current.Web
; 的误报。
我想添加 [SPDisposeCheckIgnore(SPDisposeCheckID.SPDisposeCheckID_000, "Context Web 不需要处置。")]
I have installed SPDispose and i am getting a number of false positives regarding
SPWeb web = SPContext.Current.Web
;
I want to add [SPDisposeCheckIgnore(SPDisposeCheckID.SPDisposeCheckID_000, "Context Web does not need disposed.")]
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您应该使用
[SPDisposeCheckIgnore]
属性修饰包含误报的方法:You should decorate the method that contains the false positive with the
[SPDisposeCheckIgnore]
attribute: