5

在代码清理(配置文件:StyleCop)时,它总是为构造函数、属性等创建区域......

#region Constructors and Destructors

public IpDiagnosticsService()
{
    // : base()
    // NOP. Required for serializer.
}

public IpDiagnosticsService(string applicationName, SPFarm farm) : base(applicationName, farm)
{
    // NOP
}

#endregion

#region Properties

// ...omitted.

#endregion

惊人的。我不想要那个。 它如何关闭它?找不到任何选项。

4

1 回答 1

6

Resharper depends on an XML file that defines the layout of the files. It can be found under Resharper -> Options -> Code Editing -> C# -> Type Members Layout.

enter image description here

Remove the <Group Region="*"/> elements to remove the region creation. More details about the file format can be found here.

于 2014-07-31T13:08:13.367 回答