mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
🎨REFACTOR: Use auto-properties.
This commit is contained in:
@@ -31,7 +31,6 @@
|
||||
// ****************************************************************************/
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
@@ -46,12 +45,10 @@ namespace DiscImageChef.Filesystems
|
||||
public class AODOS : IFilesystem
|
||||
{
|
||||
readonly byte[] AODOSIdentifier = {0x20, 0x41, 0x4F, 0x2D, 0x44, 0x4F, 0x53, 0x20};
|
||||
Encoding currentEncoding;
|
||||
FileSystemType xmlFsType;
|
||||
public FileSystemType XmlFsType => xmlFsType;
|
||||
public FileSystemType XmlFsType { get; private set; }
|
||||
public string Name => "Alexander Osipov DOS file system";
|
||||
public Guid Id => new Guid("668E5039-9DDD-442A-BE1B-A315D6E38E26");
|
||||
public Encoding Encoding => currentEncoding;
|
||||
public Encoding Encoding { get; private set; }
|
||||
|
||||
public bool Identify(IMediaImage imagePlugin, Partition partition)
|
||||
{
|
||||
@@ -74,9 +71,10 @@ namespace DiscImageChef.Filesystems
|
||||
return bb.identifier.SequenceEqual(AODOSIdentifier);
|
||||
}
|
||||
|
||||
public void GetInformation(IMediaImage imagePlugin, Partition partition, out string information, Encoding encoding)
|
||||
public void GetInformation(IMediaImage imagePlugin, Partition partition, out string information,
|
||||
Encoding encoding)
|
||||
{
|
||||
currentEncoding = Encoding.GetEncoding("koi8-r");
|
||||
Encoding = Encoding.GetEncoding("koi8-r");
|
||||
byte[] sector = imagePlugin.ReadSector(0);
|
||||
AODOS_BootBlock bb = new AODOS_BootBlock();
|
||||
IntPtr bbPtr = Marshal.AllocHGlobal(Marshal.SizeOf(bb));
|
||||
@@ -88,7 +86,7 @@ namespace DiscImageChef.Filesystems
|
||||
|
||||
sbInformation.AppendLine("Alexander Osipov DOS file system");
|
||||
|
||||
xmlFsType = new FileSystemType
|
||||
XmlFsType = new FileSystemType
|
||||
{
|
||||
Type = "Alexander Osipov DOS file system",
|
||||
Clusters = (long)imagePlugin.Info.Sectors,
|
||||
@@ -97,13 +95,13 @@ namespace DiscImageChef.Filesystems
|
||||
FilesSpecified = true,
|
||||
FreeClusters = (long)(imagePlugin.Info.Sectors - bb.usedSectors),
|
||||
FreeClustersSpecified = true,
|
||||
VolumeName = StringHandlers.SpacePaddedToString(bb.volumeLabel, currentEncoding),
|
||||
VolumeName = StringHandlers.SpacePaddedToString(bb.volumeLabel, Encoding),
|
||||
Bootable = true
|
||||
};
|
||||
|
||||
sbInformation.AppendFormat("{0} files on volume", bb.files).AppendLine();
|
||||
sbInformation.AppendFormat("{0} used sectors on volume", bb.usedSectors).AppendLine();
|
||||
sbInformation.AppendFormat("Disk name: {0}", StringHandlers.CToString(bb.volumeLabel, currentEncoding))
|
||||
sbInformation.AppendFormat("Disk name: {0}", StringHandlers.CToString(bb.volumeLabel, Encoding))
|
||||
.AppendLine();
|
||||
|
||||
information = sbInformation.ToString();
|
||||
|
||||
Reference in New Issue
Block a user