mirror of
https://github.com/aaru-dps/Aaru.Server.git
synced 2025-12-16 19:24:27 +00:00
REFACTOR: Reformat code.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user