简体   繁体   English

强制 Resharper 中 static 方法的冗余名称限定符

[英]Force redundant name qualifier for static methods in Resharper

I know I can force "this."我知道我可以强制“这个”。 qualifier for instance member with Resharper code cleanup.具有 Resharper 代码清理的实例成员的限定符。

Can I force redundant name qualifier for static methods?我可以为 static 方法强制使用冗余名称限定符吗?

public class Foo
{
    public void Bar()
    {
        StaticMethod();
    }

    private static void StaticMethod()
    {

    }
}

Would be forced to this:将被迫这样做:

public class Foo
{
    public void Bar()
    {
        Foo.StaticMethod();
    }

    private static void StaticMethod()
    {

    }
}

I don't see any way to do this in ReSharper 5.x, and have seen nothing about it in 6.x EAP/Beta releases, but don't have an instance of 6.x to verify.我在 ReSharper 5.x 中看不到任何方法可以做到这一点,并且在 6.x EAP/Beta 版本中没有看到任何关于它的内容,但没有要验证的 6.x 实例。

You could suggest it as a feature in JetBrains' issue tracker: http://confluence.jetbrains.net/display/ReSharper/ReSharper+Issue+Tracker您可以建议它作为 JetBrains 问题跟踪器中的一个功能: http://confluence.jetbrains.net/display/ReSharper/ReSharper+Issue+Tracker

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM