REFACTOR: Reformat code.

This commit is contained in:
2017-12-19 20:33:03 +00:00
parent 77edc7c91c
commit e6f6ace80b
704 changed files with 82627 additions and 83641 deletions

View File

@@ -103,11 +103,9 @@ namespace DiscImageChef.Decoders.SCSI.MMC
public static RecognizedFormatLayers? DecodeFormatLayers(byte[] FormatLayersResponse)
{
if(FormatLayersResponse == null)
return null;
if(FormatLayersResponse == null) return null;
if(FormatLayersResponse.Length < 8)
return null;
if(FormatLayersResponse.Length < 8) return null;
RecognizedFormatLayers decoded = new RecognizedFormatLayers();
@@ -134,8 +132,7 @@ namespace DiscImageChef.Decoders.SCSI.MMC
public static string PrettifyFormatLayers(RecognizedFormatLayers? FormatLayersResponse)
{
if(FormatLayersResponse == null)
return null;
if(FormatLayersResponse == null) return null;
RecognizedFormatLayers response = FormatLayersResponse.Value;
@@ -148,50 +145,41 @@ namespace DiscImageChef.Decoders.SCSI.MMC
switch(response.FormatLayers[i])
{
case (ushort)FormatLayerTypeCodes.BDLayer:
{
sb.AppendFormat("Layer {0} is of type Blu-ray", i).AppendLine();
if(response.DefaultFormatLayer == i)
sb.AppendLine("This is the default layer.");
if(response.OnlineFormatLayer == i)
sb.AppendLine("This is the layer actually in use.");
break;
}
{
sb.AppendFormat("Layer {0} is of type Blu-ray", i).AppendLine();
if(response.DefaultFormatLayer == i) sb.AppendLine("This is the default layer.");
if(response.OnlineFormatLayer == i) sb.AppendLine("This is the layer actually in use.");
break;
}
case (ushort)FormatLayerTypeCodes.CDLayer:
{
sb.AppendFormat("Layer {0} is of type CD", i).AppendLine();
if(response.DefaultFormatLayer == i)
sb.AppendLine("This is the default layer.");
if(response.OnlineFormatLayer == i)
sb.AppendLine("This is the layer actually in use.");
break;
}
{
sb.AppendFormat("Layer {0} is of type CD", i).AppendLine();
if(response.DefaultFormatLayer == i) sb.AppendLine("This is the default layer.");
if(response.OnlineFormatLayer == i) sb.AppendLine("This is the layer actually in use.");
break;
}
case (ushort)FormatLayerTypeCodes.DVDLayer:
{
sb.AppendFormat("Layer {0} is of type DVD", i).AppendLine();
if(response.DefaultFormatLayer == i)
sb.AppendLine("This is the default layer.");
if(response.OnlineFormatLayer == i)
sb.AppendLine("This is the layer actually in use.");
break;
}
{
sb.AppendFormat("Layer {0} is of type DVD", i).AppendLine();
if(response.DefaultFormatLayer == i) sb.AppendLine("This is the default layer.");
if(response.OnlineFormatLayer == i) sb.AppendLine("This is the layer actually in use.");
break;
}
case (ushort)FormatLayerTypeCodes.HDDVDLayer:
{
sb.AppendFormat("Layer {0} is of type HD DVD", i).AppendLine();
if(response.DefaultFormatLayer == i)
sb.AppendLine("This is the default layer.");
if(response.OnlineFormatLayer == i)
sb.AppendLine("This is the layer actually in use.");
break;
}
{
sb.AppendFormat("Layer {0} is of type HD DVD", i).AppendLine();
if(response.DefaultFormatLayer == i) sb.AppendLine("This is the default layer.");
if(response.OnlineFormatLayer == i) sb.AppendLine("This is the layer actually in use.");
break;
}
default:
{
sb.AppendFormat("Layer {0} is of unknown type 0x{1:X4}", i, response.FormatLayers[i]).AppendLine();
if(response.DefaultFormatLayer == i)
sb.AppendLine("This is the default layer.");
if(response.OnlineFormatLayer == i)
sb.AppendLine("This is the layer actually in use.");
break;
}
{
sb.AppendFormat("Layer {0} is of unknown type 0x{1:X4}", i, response.FormatLayers[i])
.AppendLine();
if(response.DefaultFormatLayer == i) sb.AppendLine("This is the default layer.");
if(response.OnlineFormatLayer == i) sb.AppendLine("This is the layer actually in use.");
break;
}
}
}
@@ -204,5 +192,4 @@ namespace DiscImageChef.Decoders.SCSI.MMC
return PrettifyFormatLayers(decoded);
}
}
}
}