File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -15,11 +15,7 @@ public class CuiInputManager : IInputManager
1515 /// <remarks>
1616 /// コンソールから文字を読み込んでいるので、戻り値の型はintになります。
1717 /// </remarks>
18- public object Read ( )
19- {
20- // ReSharper disable once HeapView.BoxingAllocation
21- return Console . Read ( ) ;
22- }
18+ public object Read ( ) => Console . Read ( ) ;
2319
2420 /// <summary>
2521 /// 一行分のデータを読み込みます。
@@ -28,9 +24,6 @@ public object Read()
2824 /// <remarks>
2925 /// コンソールから文字列を読み込んでいるので、戻り値の型はstringになります。
3026 /// </remarks>
31- public object ReadLine ( )
32- {
33- return Console . ReadLine ( ) ;
34- }
27+ public object ReadLine ( ) => Console . ReadLine ( ) ;
3528 }
3629}
Original file line number Diff line number Diff line change @@ -13,19 +13,13 @@ public class CuiOutputManager : IOutputManager
1313 /// 指定されたデータを出力します。(改行付与無し)
1414 /// </summary>
1515 /// <param name="data">データ</param>
16- public void Write ( object data )
17- {
18- Console . Write ( data ) ;
19- }
16+ public void Write ( object data ) => Console . Write ( data ) ;
2017
2118 /// <summary>
2219 /// 指定されたデータを出力します。(改行付与有り)
2320 /// </summary>
2421 /// <param name="data">データ</param>
25- public void WriteLine ( object data )
26- {
27- Console . WriteLine ( data ) ;
28- }
22+ public void WriteLine ( object data ) => Console . WriteLine ( data ) ;
2923
3024 /// <summary>
3125 /// 出力ストリーム
Original file line number Diff line number Diff line change @@ -12,9 +12,6 @@ internal class EmptyInputValidator : IHasValidation<string>
1212 /// </summary>
1313 /// <param name="value">対象データ</param>
1414 /// <returns>空文字の場合はTrue, それ以外はFalse.</returns>
15- public bool Validate ( string value )
16- {
17- return string . IsNullOrWhiteSpace ( value ) ;
18- }
15+ public bool Validate ( string value ) => string . IsNullOrWhiteSpace ( value ) ;
1916 }
2017}
You can’t perform that action at this time.
0 commit comments