Convert to switch expression.

This commit is contained in:
2022-11-13 19:59:24 +00:00
parent c5b34ee3d9
commit fca57318f5
58 changed files with 1434 additions and 2456 deletions

View File

@@ -57,23 +57,12 @@ partial class Device
if(buffer == null)
return -1;
ScsiIoctlDirection dir;
switch(direction)
{
case ScsiDirection.In:
dir = ScsiIoctlDirection.In;
break;
case ScsiDirection.Out:
dir = ScsiIoctlDirection.Out;
break;
default:
dir = ScsiIoctlDirection.Unspecified;
break;
}
ScsiIoctlDirection dir = direction switch
{
ScsiDirection.In => ScsiIoctlDirection.In,
ScsiDirection.Out => ScsiIoctlDirection.Out,
_ => ScsiIoctlDirection.Unspecified
};
var sptdSb = new ScsiPassThroughDirectAndSenseBuffer
{