有时,在搜索会员的推荐信时,我会收到此弹出窗口,这通常需要很长时间,所以我倾向于取消。但我想知道:我错过了什么?什么是“准实施”?
根据resharper 支持的这个答案 https://resharper-support.jetbrains.com/hc/en-us/community/posts/206044949-Is-this-a-Find-Usage-bug-准实现是指类通过派生方法实现接口,而包含实现的类未实现该接口。 IE。像下面这样:
public interface IProvideFoos
{
IFoo ProvideFoo( ) ;
}
public interface IFoo {}
public class BaseWhatever
{
public IFoo ProvideFoo( ) => throw new NotImplementedException( );
}
public class RealWhatever : BaseWhatever, IProvideFoos {}
YouTrack for ReSharper 上的几个问题都将其称为相同的 -One https://youtrack.jetbrains.com/issue/RSRP-284975/Usage-not-found-for-an-interface-implementation, Two https://youtrack.jetbrains.com/issue/RSRP-46273, Three https://youtrack.jetbrains.com/issue/RSRP-417302/Quasi-implemented-interface-member-is-highlighted-as-never-used
也许也有用:
- 为什么 C# 中的基类允许实现接口契约而不继承它? https://stackoverflow.com/a/2944410/2501279
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)