Code restyling.

This commit is contained in:
2020-02-29 18:03:24 +00:00
parent c88447c86e
commit f990e1f2f8
23 changed files with 581 additions and 363 deletions

View File

@@ -42,7 +42,7 @@ namespace Aaru.CommonTypes
{
public static class Geometry
{
static readonly(ushort cylinders, byte heads, ushort sectorsPerTrack, uint bytesPerSector, MediaEncoding
static readonly (ushort cylinders, byte heads, ushort sectorsPerTrack, uint bytesPerSector, MediaEncoding
encoding, bool variableSectorsPerTrack, MediaType type)[] KnownGeometries =
{
(32, 1, 8, 319, MediaEncoding.FM, false, MediaType.IBM23FD),
@@ -128,8 +128,8 @@ namespace Aaru.CommonTypes
geometry.variableSectorsPerTrack select geom.type).
FirstOrDefault();
public static(ushort cylinders, byte heads, ushort sectorsPerTrack, uint bytesPerSector, MediaEncoding encoding,
bool variableSectorsPerTrack, MediaType type) GetGeometry(MediaType mediaType) =>
public static (ushort cylinders, byte heads, ushort sectorsPerTrack, uint bytesPerSector, MediaEncoding encoding
, bool variableSectorsPerTrack, MediaType type) GetGeometry(MediaType mediaType) =>
(from geom in KnownGeometries where geom.type == mediaType select geom).FirstOrDefault();
}
}