C# の EditorConfig プロパティ: 空白行
このページでは、カスタム JetBrains Rider EditorConfig プロパティ の一覧を掲載しています。これらは C# のフォーマットの環境設定、特に JetBrains Rider で名前空間、メンバー、リージョン、インポートディレクティブのグループの前後に空行を増減するかどうかの設定に利用できます。
一般
領域の周囲
プロパティ名:
[resharper_] C# の region の周囲の空白行, [resharper_] リージョンの前後の空白行
可能な値:
整数
例:
値: 0 |
|---|
abstract class C
{
protected abstract void Method1();
#region Region Description
protected abstract void Method2();
#endregion
protected abstract void Method3();
}
|
値: 1 |
|---|
abstract class C
{
protected abstract void Method1();
#region Region Description
protected abstract void Method2();
#endregion
protected abstract void Method3();
}
|
値: 2 |
|---|
abstract class C
{
protected abstract void Method1();
#region Region Description
protected abstract void Method2();
#endregion
protected abstract void Method3();
}
|
領域の内側
プロパティ名:
[resharper_] C# の region 内の空白行, [resharper_] リージョン内の空白行
可能な値:
整数
例:
値: 0 |
|---|
abstract class C
{
protected abstract void Method1();
#region Region Description
protected abstract void Method2();
#endregion
protected abstract void Method3();
}
|
値: 1 |
|---|
abstract class C
{
protected abstract void Method1();
#region Region Description
protected abstract void Method2();
#endregion
protected abstract void Method3();
}
|
値: 2 |
|---|
abstract class C
{
protected abstract void Method1();
#region Region Description
protected abstract void Method2();
#endregion
protected abstract void Method3();
}
|
行コメントの前
プロパティ名:
[resharper_] C# の 1 行コメントの前の空白行, [resharper_] 1 行コメントの前の空白行
可能な値:
整数
例:
値: 0 |
|---|
void Foo()
{
var x = 5;
// comment
Call();
////CommentedCall();
}
|
値: 1 |
|---|
void Foo()
{
var x = 5;
// comment
Call();
////CommentedCall();
}
|
値: 2 |
|---|
void Foo()
{
var x = 5;
// comment
Call();
////CommentedCall();
}
|
宣言の空白行
宣言内の最大空白行を保持する
プロパティ名:
[resharper_] C# の宣言内の空白行を保持, [resharper_] 宣言内の空白行を保持
可能な値:
整数
例:
フォーマット前 | フォーマット後 value: 0 |
|---|---|
class C {
void Method1() {}
void Method1() {}
}
| class C
{
void Method1()
{
}
void Method1()
{
}
}
|
フォーマット前 | フォーマット後 value: 1 |
|---|---|
class C {
void Method1() {}
void Method1() {}
}
| class C
{
void Method1()
{
}
void Method1()
{
}
}
|
フォーマット前 | フォーマット後 value: 2 |
|---|---|
class C {
void Method1() {}
void Method1() {}
}
| class C
{
void Method1()
{
}
void Method1()
{
}
}
|
宣言の '{' の後および '}' の前の空白行を削除する
プロパティ名:
[resharper_] C# の宣言内の波括弧付近の空白行を削除, [resharper_] 宣言内の波括弧付近の空白行を削除
可能な値:
真 | 偽
例:
フォーマット前 | フォーマット後 true |
|---|---|
class C {
void Method1() {}
void Method1() {}
}
| class C
{
void Method1()
{
}
void Method1()
{
}
}
|
フォーマット前 | フォーマット後 false |
|---|---|
class C {
void Method1() {}
void Method1() {}
}
| class C
{
void Method1()
{
}
void Method1()
{
}
}
|
ファイルヘッダーコメントの後
プロパティ名:
[resharper_] C# の開始コメントの後の空白行, [resharper_] 開始コメントの後の空白行
可能な値:
整数
例:
値: 0 |
|---|
// Header text
class A
{
}
|
値: 1 |
|---|
// Header text
class A
{
}
|
値: 2 |
|---|
// Header text
class A
{
}
|
異なる 'using' グループ間
プロパティ名:
[resharper_] C# の using グループ間の空白行, [resharper_] using グループ間の空白行
可能な値:
整数
例:
値: 0 |
|---|
using System;
using System.Collections;
using myNamespace;
|
値: 1 |
|---|
using System;
using System.Collections;
using myNamespace;
|
値: 2 |
|---|
using System;
using System.Collections;
using myNamespace;
|
'using' リストの後
プロパティ名:
[resharper_] C# の using リストの後の空白行, [resharper_] using リストの後の空白行
可能な値:
整数
例:
値: 0 |
|---|
using System;
namespace N
{
}
|
値: 1 |
|---|
using System;
namespace N
{
}
|
値: 2 |
|---|
using System;
namespace N
{
}
|
名前空間の周囲
プロパティ名:
[resharper_] C# の名前空間の周囲の空白行, [resharper_] 名前空間の前後の空白行
可能な値:
整数
例:
値: 0 |
|---|
namespace N1
{
}
namespace N2
{
}
|
値: 1 |
|---|
namespace N1
{
}
namespace N2
{
}
|
値: 2 |
|---|
namespace N1
{
}
namespace N2
{
}
|
名前空間の内部
プロパティ名:
[resharper_] C# の名前空間内の空白行, [resharper_] 名前空間内の空白行
可能な値:
整数
例:
値: 0 |
|---|
namespace N1
{
class C1
{
}
class C2
{
}
}
|
値: 1 |
|---|
namespace N1
{
class C1
{
}
class C2
{
}
}
|
値: 2 |
|---|
namespace N1
{
class C1
{
}
class C2
{
}
}
|
ファイルスコープの名前空間ディレクティブの後
プロパティ名:
[resharper_] C# のファイルスコープ名前空間ディレクティブの後の空白行, [resharper_] ファイルスコープ名前空間ディレクティブの後の空白行
可能な値:
整数
例:
値: 0 |
|---|
namespace N1;
class C1
{
}
class C2
{
}
|
値: 1 |
|---|
namespace N1;
class C1
{
}
class C2
{
}
|
値: 2 |
|---|
namespace N1;
class C1
{
}
class C2
{
}
|
型の周囲
プロパティ名:
[resharper_] C# の型の周囲の空白行, [resharper_] 型の前後の空白行
可能な値:
整数
例:
値: 0 |
|---|
class C1
{
int a;
}
class C2
{
int a;
}
class C3
{
int a;
}
|
値: 1 |
|---|
class C1
{
int a;
}
class C2
{
int a;
}
class C3
{
int a;
}
|
値: 2 |
|---|
class C1
{
int a;
}
class C2
{
int a;
}
class C3
{
int a;
}
|
単一行タイプ周辺
プロパティ名:
[resharper_] C# の 1 行型の周囲の空白行, [resharper_] 1 行型の周囲の空白行
可能な値:
整数
例:
値: 0 |
|---|
delegate int MyDelegate(int a);
delegate int MyDelegate2(int a);
delegate int MyDelegate3(int a);
|
値: 1 |
|---|
delegate int MyDelegate(int a);
delegate int MyDelegate2(int a);
delegate int MyDelegate3(int a);
|
値: 2 |
|---|
delegate int MyDelegate(int a);
delegate int MyDelegate2(int a);
delegate int MyDelegate3(int a);
|
型の内側
プロパティ名:
[resharper_] C# の型内の空白行, [resharper_] 型内の空白行
可能な値:
整数
例:
値: 0 |
|---|
class C
{
int x;
int y;
}
|
値: 1 |
|---|
class C
{
int x;
int y;
}
|
値: 2 |
|---|
class C
{
int x;
int y;
}
|
フィールドの周囲
プロパティ名:
[resharper_] C# のフィールドの周囲の空白行, [resharper_] フィールドの前後の空白行
可能な値:
整数
例:
値: 0 |
|---|
class C
{
/// <summary>x description</summary>
int x;
/// <summary>y description</summary>
int y;
}
|
値: 1 |
|---|
class C
{
/// <summary>x description</summary>
int x;
/// <summary>y description</summary>
int y;
}
|
値: 2 |
|---|
class C
{
/// <summary>x description</summary>
int x;
/// <summary>y description</summary>
int y;
}
|
単一行フィールドの周囲
プロパティ名:
[resharper_] C# の 1 行フィールドの周囲の空白行, [resharper_] 1 行フィールドの前後の空白行
可能な値:
整数
例:
値: 0 |
|---|
class C
{
int x;
int y;
}
|
値: 1 |
|---|
class C
{
int x;
int y;
}
|
値: 2 |
|---|
class C
{
int x;
int y;
}
|
プロパティ / イベント周辺
プロパティ名:
[resharper_] C# のプロパティの周囲の空白行, [resharper_] プロパティの周囲の空白行
可能な値:
整数
例:
値: 0 |
|---|
class C
{
/// <summary>x description</summary>
public int X
{
get { return 1; }
}
/// <summary>y description</summary>
public int Y
{
get { return 2; }
}
}
|
値: 1 |
|---|
class C
{
/// <summary>x description</summary>
public int X
{
get { return 1; }
}
/// <summary>y description</summary>
public int Y
{
get { return 2; }
}
}
|
値: 2 |
|---|
class C
{
/// <summary>x description</summary>
public int X
{
get { return 1; }
}
/// <summary>y description</summary>
public int Y
{
get { return 2; }
}
}
|
単一行プロパティ / イベントの周囲
プロパティ名:
[resharper_] C# の 1 行プロパティの周囲の空白行, [resharper_] 1 行プロパティの周囲の空白行
可能な値:
整数
例:
値: 0 |
|---|
class C
{
public int X { get { return 1; } }
public int Y { get { return 2; } }
}
|
値: 1 |
|---|
class C
{
public int X { get { return 1; } }
public int Y { get { return 2; } }
}
|
値: 2 |
|---|
class C
{
public int X { get { return 1; } }
public int Y { get { return 2; } }
}
|
自動 / 抽象プロパティ / イベントの周囲
プロパティ名:
[resharper_] C# の自動プロパティの周囲の空白行, [resharper_] 自動プロパティの周囲の空白行
可能な値:
整数
例:
値: 0 |
|---|
class C
{
/// <summary>x description</summary>
public int X { get; set; }
/// <summary>x description</summary>
public int Y { get; set; }
}
|
値: 1 |
|---|
class C
{
/// <summary>x description</summary>
public int X { get; set; }
/// <summary>x description</summary>
public int Y { get; set; }
}
|
値: 2 |
|---|
class C
{
/// <summary>x description</summary>
public int X { get; set; }
/// <summary>x description</summary>
public int Y { get; set; }
}
|
一行自動 / 抽象プロパティ / イベントの周囲
プロパティ名:
[resharper_] C# の 1 行自動プロパティの周囲の空白行, [resharper_] 1 行自動プロパティの周囲の空白行
可能な値:
整数
例:
値: 0 |
|---|
class C
{
public int X { get; set; }
public int Y { get; set; }
}
|
値: 1 |
|---|
class C
{
public int X { get; set; }
public int Y { get; set; }
}
|
値: 2 |
|---|
class C
{
public int X { get; set; }
public int Y { get; set; }
}
|
プロパティ / イベントアクセサー周辺
プロパティ名:
[resharper_] C# のアクセサーの周囲の空白行, [resharper_] アクセサーの周囲の空白行
可能な値:
整数
例:
値: 0 |
|---|
class C
{
public int X
{
get
{
DoSomething();
return 1;
}
set
{
DoSomething();
myField = value;
}
}
}
|
値: 1 |
|---|
class C
{
public int X
{
get
{
DoSomething();
return 1;
}
set
{
DoSomething();
myField = value;
}
}
}
|
値: 2 |
|---|
class C
{
public int X
{
get
{
DoSomething();
return 1;
}
set
{
DoSomething();
myField = value;
}
}
}
|
単一行のプロパティ / イベントアクセサー周辺
プロパティ名:
[resharper_] C# の 1 行アクセサーの周囲の空白行, [resharper_] 1 行アクセサーの周囲の空白行
可能な値:
整数
例:
値: 0 |
|---|
class C
{
public int X
{
get { return 1; }
set { myField = value; }
}
}
|
値: 1 |
|---|
class C
{
public int X
{
get { return 1; }
set { myField = value; }
}
}
|
値: 2 |
|---|
class C
{
public int X
{
get { return 1; }
set { myField = value; }
}
}
|
メソッドの周囲
プロパティ名:
[resharper_] C# の呼び出し可能メンバーの周囲の空白行, [resharper_] 呼び出し可能メンバーの前後の空白行
可能な値:
整数
例:
値: 0 |
|---|
class C
{
void Method1()
{
foo();
foo2();
}
void Method2()
{
foo();
foo2();
}
}
|
値: 1 |
|---|
class C
{
void Method1()
{
foo();
foo2();
}
void Method2()
{
foo();
foo2();
}
}
|
値: 2 |
|---|
class C
{
void Method1()
{
foo();
foo2();
}
void Method2()
{
foo();
foo2();
}
}
|
単一行メソッドの周囲
プロパティ名:
[resharper_] C# の 1 行呼び出し可能メンバーの周囲の空白行, [resharper_] 1 行の呼び出し可能メンバーの前後の空白行
可能な値:
整数
例:
値: 0 |
|---|
abstract class C
{
abstract void Method1();
abstract void Method2();
}
|
値: 1 |
|---|
abstract class C
{
abstract void Method1();
abstract void Method2();
}
|
値: 2 |
|---|
abstract class C
{
abstract void Method1();
abstract void Method2();
}
|
コード内の空白行
コード内の最大空白行を保持する
プロパティ名:
[resharper_] C# のコード内の空白行を保持, [resharper_] コード内の空白行を保持
可能な値:
整数
例:
フォーマット前 | フォーマット後 value: 0 |
|---|---|
void Method() {
foo();
foo();
}
| void Method()
{
foo();
foo();
}
|
フォーマット前 | フォーマット後 value: 1 |
|---|---|
void Method() {
foo();
foo();
}
| void Method()
{
foo();
foo();
}
|
フォーマット前 | フォーマット後 value: 2 |
|---|---|
void Method() {
foo();
foo();
}
| void Method()
{
foo();
foo();
}
|
コードの '{' の後および '}' の前の空白行を削除する
プロパティ名:
[resharper_] C# のコード内の波括弧付近の空白行を削除, [resharper_] コード内の波括弧付近の空白行を削除
可能な値:
真 | 偽
例:
フォーマット前 | フォーマット後 true |
|---|---|
void Method() {
foo();
foo();
}
| void Method()
{
foo();
foo();
}
|
フォーマット前 | フォーマット後 false |
|---|---|
void Method() {
foo();
foo();
}
| void Method()
{
foo();
foo();
}
|
ローカル関数の周囲
プロパティ名:
[resharper_] C# のローカルメソッドの周囲の空白行, [resharper_] ローカルメソッドの周囲の空白行
可能な値:
整数
例:
値: 0 |
|---|
void Method()
{
void LocalFunction1()
{
foo();
foo2();
}
void LocalFunction2()
{
foo();
foo2();
}
}
|
値: 1 |
|---|
void Method()
{
void LocalFunction1()
{
foo();
foo2();
}
void LocalFunction2()
{
foo();
foo2();
}
}
|
値: 2 |
|---|
void Method()
{
void LocalFunction1()
{
foo();
foo2();
}
void LocalFunction2()
{
foo();
foo2();
}
}
|
単一行ローカル関数の周囲
プロパティ名:
[resharper_] C# の 1 行ローカルメソッドの周囲の空白行, [resharper_] 1 行ローカルメソッドの周囲の空白行
可能な値:
整数
例:
値: 0 |
|---|
void Method()
{
void LocalFunction1() { }
void LocalFunction2() { }
}
|
値: 1 |
|---|
void Method()
{
void LocalFunction1() { }
void LocalFunction2() { }
}
|
値: 2 |
|---|
void Method()
{
void LocalFunction1() { }
void LocalFunction2() { }
}
|
制御転送を伴うステートメントの前
プロパティ名:
[resharper_] C# の制御移行ステートメントの前の空白行, [resharper_] 制御移行ステートメントの前の空白行
可能な値:
整数
例:
値: 0 |
|---|
void Foo(string arg)
{
Logger.Log("Foo");
if (arg == null) throw new ArgumentNullException();
var smth = arg.GetSomething();
if (smth == null) return null;
var smthElse = smth.GetSomethingElse();
}
|
値: 1 |
|---|
void Foo(string arg)
{
Logger.Log("Foo");
if (arg == null) throw new ArgumentNullException();
var smth = arg.GetSomething();
if (smth == null) return null;
var smthElse = smth.GetSomethingElse();
}
|
値: 2 |
|---|
void Foo(string arg)
{
Logger.Log("Foo");
if (arg == null) throw new ArgumentNullException();
var smth = arg.GetSomething();
if (smth == null) return null;
var smthElse = smth.GetSomethingElse();
}
|
制御転送を伴うステートメントの後
プロパティ名:
[resharper_] C# の制御移行ステートメントの後の空白行, [resharper_] 制御移行ステートメントの後の空白行
可能な値:
整数
例:
値: 0 |
|---|
void Foo(string arg)
{
if (arg == null) throw new ArgumentNullException();
var smth = arg.GetSomething();
if (smth == null) return null;
var smthElse = smth.GetSomethingElse();
}
|
値: 1 |
|---|
void Foo(string arg)
{
if (arg == null) throw new ArgumentNullException();
var smth = arg.GetSomething();
if (smth == null) return null;
var smthElse = smth.GetSomethingElse();
}
|
値: 2 |
|---|
void Foo(string arg)
{
if (arg == null) throw new ArgumentNullException();
var smth = arg.GetSomething();
if (smth == null) return null;
var smthElse = smth.GetSomethingElse();
}
|
子ブロックを含むステートメントの前
プロパティ名:
[resharper_] C# のブロックステートメントの前の空白行, [resharper_] ブロックステートメントの前の空白行
可能な値:
整数
例:
値: 0 |
|---|
string Foo(string arg)
{
Logger.Log("Foo");
if (arg == "A")
{
DoSomething();
DoSomethingElse();
}
DoMoreThings();
}
|
値: 1 |
|---|
string Foo(string arg)
{
Logger.Log("Foo");
if (arg == "A")
{
DoSomething();
DoSomethingElse();
}
DoMoreThings();
}
|
値: 2 |
|---|
string Foo(string arg)
{
Logger.Log("Foo");
if (arg == "A")
{
DoSomething();
DoSomethingElse();
}
DoMoreThings();
}
|
子ブロックを含むステートメントの後
プロパティ名:
[resharper_] C# のブロックステートメントの後の空白行, [resharper_] ブロックステートメントの後の空白行
可能な値:
整数
例:
値: 0 |
|---|
string Foo(string arg)
{
Logger.Log("Foo");
if (arg == "A")
{
DoSomething();
DoSomethingElse();
}
DoMoreThings();
}
|
値: 1 |
|---|
string Foo(string arg)
{
Logger.Log("Foo");
if (arg == "A")
{
DoSomething();
DoSomethingElse();
}
DoMoreThings();
}
|
値: 2 |
|---|
string Foo(string arg)
{
Logger.Log("Foo");
if (arg == "A")
{
DoSomething();
DoSomethingElse();
}
DoMoreThings();
}
|
複数行のステートメントの前
プロパティ名:
[resharper_] C# の複数行ステートメントの前の空白行, [resharper_] 複数行ステートメントの前の空白行
可能な値:
整数
例:
値: 0 |
|---|
string Foo(string arg)
{
DoSomething();
foreach (var x in y)
{
x.DoSomething();
x.DoSomethingElse();
}
DoSomething();
foreach (var x in y)
x.DoSomething();
DoSomething();
DoSomething(
1,
2);
DoSomething();
}
|
値: 1 |
|---|
string Foo(string arg)
{
DoSomething();
foreach (var x in y)
{
x.DoSomething();
x.DoSomethingElse();
}
DoSomething();
foreach (var x in y)
x.DoSomething();
DoSomething();
DoSomething(
1,
2);
DoSomething();
}
|
値: 2 |
|---|
string Foo(string arg)
{
DoSomething();
foreach (var x in y)
{
x.DoSomething();
x.DoSomethingElse();
}
DoSomething();
foreach (var x in y)
x.DoSomething();
DoSomething();
DoSomething(
1,
2);
DoSomething();
}
|
複数行のステートメントの後
プロパティ名:
[resharper_] C# の複数行ステートメントの後の空白行, [resharper_] 複数行ステートメントの後の空白行
可能な値:
整数
例:
値: 0 |
|---|
string Foo(string arg)
{
DoSomething();
foreach (var x in y)
{
x.DoSomething();
x.DoSomethingElse();
}
DoSomething();
foreach (var x in y)
x.DoSomething();
DoSomething();
DoSomething(
1,
2);
DoSomething();
}
|
値: 1 |
|---|
string Foo(string arg)
{
DoSomething();
foreach (var x in y)
{
x.DoSomething();
x.DoSomethingElse();
}
DoSomething();
foreach (var x in y)
x.DoSomething();
DoSomething();
DoSomething(
1,
2);
DoSomething();
}
|
値: 2 |
|---|
string Foo(string arg)
{
DoSomething();
foreach (var x in y)
{
x.DoSomething();
x.DoSomethingElse();
}
DoSomething();
foreach (var x in y)
x.DoSomething();
DoSomething();
DoSomething(
1,
2);
DoSomething();
}
|
switch ステートメントにブロックがある 'case' セクションの周囲
プロパティ名:
[resharper_] C# のブロック case セクションの周囲の空白行, [resharper_] ブロック case セクションの周囲の空白行
可能な値:
整数
例:
値: 0 |
|---|
switch (a)
{
case 1:
{
DoThis();
DoThat();
break;
}
case 2:
{
DoIt();
DoItAgainWithLove();
break;
}
default:
{
DoNothing();
DoSomething();
break;
}
}
|
値: 1 |
|---|
switch (a)
{
case 1:
{
DoThis();
DoThat();
break;
}
case 2:
{
DoIt();
DoItAgainWithLove();
break;
}
default:
{
DoNothing();
DoSomething();
break;
}
}
|
値: 2 |
|---|
switch (a)
{
case 1:
{
DoThis();
DoThat();
break;
}
case 2:
{
DoIt();
DoItAgainWithLove();
break;
}
default:
{
DoNothing();
DoSomething();
break;
}
}
|
switch ステートメントの複数行 'case' セクションの周囲
プロパティ名:
[resharper_] C# の複数行 case セクションの周囲の空白行, [resharper_] 複数行 case セクションの周囲の空白行
可能な値:
整数
例:
値: 0 |
|---|
switch (a)
{
case 1:
DoThis();
break;
case 2:
DoThat();
break;
default:
DoNothing();
break;
}
|
値: 1 |
|---|
switch (a)
{
case 1:
DoThis();
break;
case 2:
DoThat();
break;
default:
DoNothing();
break;
}
|
値: 2 |
|---|
switch (a)
{
case 1:
DoThis();
break;
case 2:
DoThat();
break;
default:
DoNothing();
break;
}
|
switch ステートメントの 'case' の前
プロパティ名:
[resharper_] C# の case の前の空白行, [resharper_] case の前の空白行
可能な値:
整数
例:
値: 0 |
|---|
switch (a)
{
case 1: return x;
case 2: return y;
default: return 0;
}
|
値: 1 |
|---|
switch (a)
{
case 1: return x;
case 2: return y;
default: return 0;
}
|
値: 2 |
|---|
switch (a)
{
case 1: return x;
case 2: return y;
default: return 0;
}
|
switch ステートメントの 'case' の後
プロパティ名:
[resharper_]csharp_blank_lines_after_case, [resharper_] case の後の空白行
可能な値:
整数
例:
値: 0 |
|---|
switch (a)
{
case 1:
DoThis();
DoThat();
break;
case 2:
DoIt();
DoItAgainWithLove();
break;
default:
DoNothing();
DoSomething();
break;
}
|
値: 1 |
|---|
switch (a)
{
case 1:
DoThis();
DoThat();
break;
case 2:
DoIt();
DoItAgainWithLove();
break;
default:
DoNothing();
DoSomething();
break;
}
|
値: 2 |
|---|
switch (a)
{
case 1:
DoThis();
DoThat();
break;
case 2:
DoIt();
DoItAgainWithLove();
break;
default:
DoNothing();
DoSomething();
break;
}
|