From d777061105f781dacf471b4611007485089d6dfb Mon Sep 17 00:00:00 2001 From: Natalia Portillo Date: Wed, 3 Feb 2016 18:58:11 +0000 Subject: [PATCH] * commandline: * DiscImageChef.Settings/Settings.cs: * DiscImageChef.Settings/docs/README.txt: * DiscImageChef.Settings/packages.config: * DiscImageChef.Settings/docs/LICENSE.txt: * DiscImageChef.Settings/docs/ChangeLog.txt: * DiscImageChef.Settings/docs/mono/index.xml: * DiscImageChef.Settings/docs/html/index.html: * DiscImageChef.Settings/Properties/AssemblyInfo.cs: * DiscImageChef.Settings/DiscImageChef.Settings.csproj: * DiscImageChef.Settings/docs/mono/ns-Claunia.PropertyList.xml: * DiscImageChef.Settings/docs/mono/Claunia.PropertyList/UID.xml: * DiscImageChef.Settings/docs/html/Claunia.PropertyList/UID.html: * DiscImageChef.Settings/docs/mono/Claunia.PropertyList/NSSet.xml: * DiscImageChef.Settings/docs/html/Claunia.PropertyList/index.html: * DiscImageChef.Settings/docs/html/Claunia.PropertyList/NSSet.html: * DiscImageChef.Settings/docs/mono/Claunia.PropertyList/NSDate.xml: * DiscImageChef.Settings/docs/mono/Claunia.PropertyList/NSData.xml: * DiscImageChef.Settings/docs/html/Claunia.PropertyList/NSDate.html: * DiscImageChef.Settings/docs/html/Claunia.PropertyList/NSData.html: * DiscImageChef.Settings/docs/mono/Claunia.PropertyList/NSArray.xml: * DiscImageChef.Settings/docs/mono/Claunia.PropertyList/NSNumber.xml: * DiscImageChef.Settings/docs/mono/Claunia.PropertyList/NSString.xml: * DiscImageChef.Settings/docs/mono/Claunia.PropertyList/NSObject.xml: * DiscImageChef.Settings/docs/html/Claunia.PropertyList/NSArray.html: * DiscImageChef.Settings/docs/html/Claunia.PropertyList/NSNumber.html: * DiscImageChef.Settings/docs/html/Claunia.PropertyList/NSString.html: * DiscImageChef.Settings/docs/html/Claunia.PropertyList/NSObject.html: * DiscImageChef.Settings/docs/mono/Claunia.PropertyList/NSDictionary.xml: * DiscImageChef.Settings/docs/html/Claunia.PropertyList/NSDictionary.html: * DiscImageChef.Settings/docs/mono/Claunia.PropertyList/PropertyListParser.xml: * DiscImageChef.Settings/docs/html/Claunia.PropertyList/PropertyListParser.html: * DiscImageChef.Settings/docs/mono/Claunia.PropertyList/XmlPropertyListParser.xml: * DiscImageChef.Settings/docs/html/Claunia.PropertyList/XmlPropertyListParser.html: * DiscImageChef.Settings/docs/mono/Claunia.PropertyList/ASCIIPropertyListParser.xml: * DiscImageChef.Settings/docs/html/Claunia.PropertyList/ASCIIPropertyListParser.html: * DiscImageChef.Settings/docs/mono/Claunia.PropertyList/BinaryPropertyListParser.xml: * DiscImageChef.Settings/docs/mono/Claunia.PropertyList/BinaryPropertyListWriter.xml: * DiscImageChef.Settings/docs/html/Claunia.PropertyList/BinaryPropertyListWriter.html: * DiscImageChef.Settings/docs/html/Claunia.PropertyList/BinaryPropertyListParser.html: * DiscImageChef.Settings/docs/mono/Claunia.PropertyList/PropertyListFormatException.xml: * DiscImageChef.Settings/docs/html/Claunia.PropertyList/PropertyListFormatException.html: Added supports for settings * DiscImageChef/Commands/Configure.cs: Added support for settings. * DiscImageChef/Core/Statistics.cs: * DiscImageChef/Commands/Verify.cs: * DiscImageChef/Commands/Entropy.cs: * DiscImageChef/Commands/Formats.cs: * DiscImageChef/Commands/PrintHex.cs: * DiscImageChef/Commands/MediaInfo.cs: * DiscImageChef/Commands/Statistics.cs: Added statistics. * DiscImageChef.Decoders/SCSI/Inquiry.cs: Corrected bug on inquiry decoding. * DiscImageChef.Decoders/SCSI/Modes.cs: Corrected bug on decoding mode page 2Ah without write performance descriptors. Corrected bug when there is a vendor page 0 in mode sense decoding. * DiscImageChef.Devices/Device/Constructor.cs: Corrected detecting USB or FireWire attached CD/DVD/BD and tape drives. Try ATA identify on USB or FireWire that don't have SCSI INQUIRY. * DiscImageChef.DiscImages/CDRWin.cs: Corrected CD-ROM XA vs CD-ROM detection. * DiscImageChef.Partitions/AppleMap.cs: Corrected big endian working. Added debug output. * DiscImageChef.sln: Added supports for settings. * DiscImageChef/Commands/Decode.cs: * DiscImageChef/Commands/Analyze.cs: * DiscImageChef/Commands/Compare.cs: * DiscImageChef/Commands/Checksum.cs: * DiscImageChef/Commands/Benchmark.cs: * DiscImageChef/Commands/DeviceInfo.cs: * DiscImageChef/Commands/CreateSidecar.cs: Added statistics. * DiscImageChef/Commands/DeviceReport.cs: Added statistics. Correct handling empty inquiry string fields. Suppose it is not removable, til proved wrong. Corrected MODE SENSE (6/10) detection and calling order. If device is MMC type but reports neither mode page 2Ah neither GET CONFIGURATION, try all CDs (old drives work like that). Try reading Lead-In and Lead-Out in Audio CD using Audio READ CD commands. Corrected READ LONG information handling, some drives return 2s-complement in 32 bit. Upper 16 bits are ignored. Added support for DVD raw block (37856 bytes). Check READ LONG up to 36 times the cooked block size. That should be enough to detect huge blocked media (like DVD and BD) without taking ages. If READ LONG size had to be bruteforced, and debug is activated, save the result. * DiscImageChef/Commands/DumpMedia.cs: Added statistics. Corrected READ LONG information handling, some drives return 2s-complement in 32 bit. Upper 16 bits are ignored. Start trying with 64 blocks at a time. Some drives report to be able to read 255 at a time, but they really don't, they take a lot longer to read. * DiscImageChef/Commands/MediaScan.cs: Added statistics. Start trying with 64 blocks at a time. Some drives report to be able to read 255 at a time, but they really don't, they take a lot longer to read. * DiscImageChef/DiscImageChef.csproj: Added support for settings. Added statistics. * DiscImageChef/Main.cs: * DiscImageChef/Options.cs: Added support for settings. Added statistics. --- ChangeLog | 8 + DiscImageChef.Decoders/ChangeLog | 11 + DiscImageChef.Decoders/SCSI/Inquiry.cs | 2 +- DiscImageChef.Decoders/SCSI/Modes.cs | 93 +- DiscImageChef.Devices/ChangeLog | 8 + DiscImageChef.Devices/Device/Constructor.cs | 32 +- DiscImageChef.DiscImages/CDRWin.cs | 2 +- DiscImageChef.DiscImages/ChangeLog | 5 + DiscImageChef.Partitions/AppleMap.cs | 13 + DiscImageChef.Partitions/ChangeLog | 6 + DiscImageChef.Settings/ChangeLog | 45 + .../DiscImageChef.Settings.csproj | 90 + .../Properties/AssemblyInfo.cs | 64 + DiscImageChef.Settings/Settings.cs | 489 +++++ DiscImageChef.Settings/docs/ChangeLog.txt | 362 ++++ DiscImageChef.Settings/docs/LICENSE.txt | 22 + DiscImageChef.Settings/docs/README.txt | 33 + .../ASCIIPropertyListParser.html | 1612 +++++++++++++++ .../BinaryPropertyListParser.html | 753 +++++++ .../BinaryPropertyListWriter.html | 567 ++++++ .../html/Claunia.PropertyList/NSArray.html | 960 +++++++++ .../html/Claunia.PropertyList/NSData.html | 743 +++++++ .../html/Claunia.PropertyList/NSDate.html | 604 ++++++ .../Claunia.PropertyList/NSDictionary.html | 1790 +++++++++++++++++ .../html/Claunia.PropertyList/NSNumber.html | 1139 +++++++++++ .../html/Claunia.PropertyList/NSObject.html | 830 ++++++++ .../docs/html/Claunia.PropertyList/NSSet.html | 932 +++++++++ .../html/Claunia.PropertyList/NSString.html | 783 +++++++ .../PropertyListFormatException.html | 289 +++ .../PropertyListParser.html | 1002 +++++++++ .../docs/html/Claunia.PropertyList/UID.html | 445 ++++ .../XmlPropertyListParser.html | 362 ++++ .../docs/html/Claunia.PropertyList/index.html | 394 ++++ DiscImageChef.Settings/docs/html/index.html | 398 ++++ .../ASCIIPropertyListParser.xml | 750 +++++++ .../BinaryPropertyListParser.xml | 296 +++ .../BinaryPropertyListWriter.xml | 180 ++ .../mono/Claunia.PropertyList/NSArray.xml | 429 ++++ .../docs/mono/Claunia.PropertyList/NSData.xml | 260 +++ .../docs/mono/Claunia.PropertyList/NSDate.xml | 189 ++ .../Claunia.PropertyList/NSDictionary.xml | 916 +++++++++ .../mono/Claunia.PropertyList/NSNumber.xml | 507 +++++ .../mono/Claunia.PropertyList/NSObject.xml | 339 ++++ .../docs/mono/Claunia.PropertyList/NSSet.xml | 411 ++++ .../mono/Claunia.PropertyList/NSString.xml | 310 +++ .../PropertyListFormatException.xml | 41 + .../PropertyListParser.xml | 411 ++++ .../docs/mono/Claunia.PropertyList/UID.xml | 105 + .../XmlPropertyListParser.xml | 90 + DiscImageChef.Settings/docs/mono/index.xml | 54 + .../docs/mono/ns-Claunia.PropertyList.xml | 6 + DiscImageChef.Settings/packages.config | 4 + DiscImageChef.sln | 32 + DiscImageChef/ChangeLog | 68 + DiscImageChef/Commands/Analyze.cs | 15 +- DiscImageChef/Commands/Benchmark.cs | 20 +- DiscImageChef/Commands/Checksum.cs | 4 + DiscImageChef/Commands/Compare.cs | 7 + DiscImageChef/Commands/Configure.cs | 169 ++ DiscImageChef/Commands/CreateSidecar.cs | 12 + DiscImageChef/Commands/Decode.cs | 4 + DiscImageChef/Commands/DeviceInfo.cs | 4 + DiscImageChef/Commands/DeviceReport.cs | 144 +- DiscImageChef/Commands/DumpMedia.cs | 16 +- DiscImageChef/Commands/Entropy.cs | 4 +- DiscImageChef/Commands/Formats.cs | 2 + DiscImageChef/Commands/MediaInfo.cs | 5 + DiscImageChef/Commands/MediaScan.cs | 25 +- DiscImageChef/Commands/PrintHex.cs | 2 + DiscImageChef/Commands/Statistics.cs | 199 ++ DiscImageChef/Commands/Verify.cs | 17 + DiscImageChef/Core/Statistics.cs | 725 +++++++ DiscImageChef/DiscImageChef.csproj | 11 +- DiscImageChef/Main.cs | 16 +- DiscImageChef/Options.cs | 16 + 75 files changed, 21603 insertions(+), 100 deletions(-) create mode 100644 DiscImageChef.Settings/ChangeLog create mode 100644 DiscImageChef.Settings/DiscImageChef.Settings.csproj create mode 100644 DiscImageChef.Settings/Properties/AssemblyInfo.cs create mode 100644 DiscImageChef.Settings/Settings.cs create mode 100644 DiscImageChef.Settings/docs/ChangeLog.txt create mode 100644 DiscImageChef.Settings/docs/LICENSE.txt create mode 100644 DiscImageChef.Settings/docs/README.txt create mode 100644 DiscImageChef.Settings/docs/html/Claunia.PropertyList/ASCIIPropertyListParser.html create mode 100644 DiscImageChef.Settings/docs/html/Claunia.PropertyList/BinaryPropertyListParser.html create mode 100644 DiscImageChef.Settings/docs/html/Claunia.PropertyList/BinaryPropertyListWriter.html create mode 100644 DiscImageChef.Settings/docs/html/Claunia.PropertyList/NSArray.html create mode 100644 DiscImageChef.Settings/docs/html/Claunia.PropertyList/NSData.html create mode 100644 DiscImageChef.Settings/docs/html/Claunia.PropertyList/NSDate.html create mode 100644 DiscImageChef.Settings/docs/html/Claunia.PropertyList/NSDictionary.html create mode 100644 DiscImageChef.Settings/docs/html/Claunia.PropertyList/NSNumber.html create mode 100644 DiscImageChef.Settings/docs/html/Claunia.PropertyList/NSObject.html create mode 100644 DiscImageChef.Settings/docs/html/Claunia.PropertyList/NSSet.html create mode 100644 DiscImageChef.Settings/docs/html/Claunia.PropertyList/NSString.html create mode 100644 DiscImageChef.Settings/docs/html/Claunia.PropertyList/PropertyListFormatException.html create mode 100644 DiscImageChef.Settings/docs/html/Claunia.PropertyList/PropertyListParser.html create mode 100644 DiscImageChef.Settings/docs/html/Claunia.PropertyList/UID.html create mode 100644 DiscImageChef.Settings/docs/html/Claunia.PropertyList/XmlPropertyListParser.html create mode 100644 DiscImageChef.Settings/docs/html/Claunia.PropertyList/index.html create mode 100644 DiscImageChef.Settings/docs/html/index.html create mode 100644 DiscImageChef.Settings/docs/mono/Claunia.PropertyList/ASCIIPropertyListParser.xml create mode 100644 DiscImageChef.Settings/docs/mono/Claunia.PropertyList/BinaryPropertyListParser.xml create mode 100644 DiscImageChef.Settings/docs/mono/Claunia.PropertyList/BinaryPropertyListWriter.xml create mode 100644 DiscImageChef.Settings/docs/mono/Claunia.PropertyList/NSArray.xml create mode 100644 DiscImageChef.Settings/docs/mono/Claunia.PropertyList/NSData.xml create mode 100644 DiscImageChef.Settings/docs/mono/Claunia.PropertyList/NSDate.xml create mode 100644 DiscImageChef.Settings/docs/mono/Claunia.PropertyList/NSDictionary.xml create mode 100644 DiscImageChef.Settings/docs/mono/Claunia.PropertyList/NSNumber.xml create mode 100644 DiscImageChef.Settings/docs/mono/Claunia.PropertyList/NSObject.xml create mode 100644 DiscImageChef.Settings/docs/mono/Claunia.PropertyList/NSSet.xml create mode 100644 DiscImageChef.Settings/docs/mono/Claunia.PropertyList/NSString.xml create mode 100644 DiscImageChef.Settings/docs/mono/Claunia.PropertyList/PropertyListFormatException.xml create mode 100644 DiscImageChef.Settings/docs/mono/Claunia.PropertyList/PropertyListParser.xml create mode 100644 DiscImageChef.Settings/docs/mono/Claunia.PropertyList/UID.xml create mode 100644 DiscImageChef.Settings/docs/mono/Claunia.PropertyList/XmlPropertyListParser.xml create mode 100644 DiscImageChef.Settings/docs/mono/index.xml create mode 100644 DiscImageChef.Settings/docs/mono/ns-Claunia.PropertyList.xml create mode 100644 DiscImageChef.Settings/packages.config create mode 100644 DiscImageChef/Commands/Configure.cs create mode 100644 DiscImageChef/Commands/Statistics.cs create mode 100644 DiscImageChef/Core/Statistics.cs diff --git a/ChangeLog b/ChangeLog index 6910be55..06b93171 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2016-02-03 Natalia Portillo + + * commandline: + Added supports for settings + + * DiscImageChef.sln: + Added supports for settings. + 2015-12-31 Natalia Portillo * CICMMetadata: diff --git a/DiscImageChef.Decoders/ChangeLog b/DiscImageChef.Decoders/ChangeLog index f25578e5..01cbf2da 100644 --- a/DiscImageChef.Decoders/ChangeLog +++ b/DiscImageChef.Decoders/ChangeLog @@ -1,3 +1,14 @@ +2016-02-03 Natalia Portillo + + * SCSI/Inquiry.cs: + Corrected bug on inquiry decoding. + + * SCSI/Modes.cs: + Corrected bug on decoding mode page 2Ah without write + performance descriptors. + Corrected bug when there is a vendor page 0 in mode sense + decoding. + 2016-01-15 Natalia Portillo * SCSI/Modes.cs: diff --git a/DiscImageChef.Decoders/SCSI/Inquiry.cs b/DiscImageChef.Decoders/SCSI/Inquiry.cs index baf0ec4a..096c7772 100644 --- a/DiscImageChef.Decoders/SCSI/Inquiry.cs +++ b/DiscImageChef.Decoders/SCSI/Inquiry.cs @@ -189,7 +189,7 @@ namespace DiscImageChef.Decoders.SCSI if (SCSIInquiryResponse.Length > 96) { decoded.VendorSpecific2 = new byte[SCSIInquiryResponse.Length - 96]; - Array.Copy(SCSIInquiryResponse, 96, decoded.Reserved5, 0, SCSIInquiryResponse.Length - 96); + Array.Copy(SCSIInquiryResponse, 96, decoded.VendorSpecific2, 0, SCSIInquiryResponse.Length - 96); } return decoded; diff --git a/DiscImageChef.Decoders/SCSI/Modes.cs b/DiscImageChef.Decoders/SCSI/Modes.cs index bfe14480..2f3c7cd1 100644 --- a/DiscImageChef.Decoders/SCSI/Modes.cs +++ b/DiscImageChef.Decoders/SCSI/Modes.cs @@ -5173,14 +5173,17 @@ namespace DiscImageChef.Decoders.SCSI sb.AppendFormat("\tDrive's current writing speed is {0} Kbyte/sec.", page.CurrentWriteSpeed).AppendLine(); } - foreach (ModePage_2A_WriteDescriptor descriptor in page.WriteSpeedPerformanceDescriptors) + if(page.WriteSpeedPerformanceDescriptors != null) { - if (descriptor.WriteSpeed > 0) + foreach (ModePage_2A_WriteDescriptor descriptor in page.WriteSpeedPerformanceDescriptors) { - if (descriptor.RotationControl == 0) - sb.AppendFormat("\tDrive supports writing at {0} Kbyte/sec. in CLV mode", descriptor.WriteSpeed).AppendLine(); - else if (descriptor.RotationControl == 1) - sb.AppendFormat("\tDrive supports writing at is {0} Kbyte/sec. in pure CAV mode", descriptor.WriteSpeed).AppendLine(); + if (descriptor.WriteSpeed > 0) + { + if (descriptor.RotationControl == 0) + sb.AppendFormat("\tDrive supports writing at {0} Kbyte/sec. in CLV mode", descriptor.WriteSpeed).AppendLine(); + else if (descriptor.RotationControl == 1) + sb.AppendFormat("\tDrive supports writing at is {0} Kbyte/sec. in pure CAV mode", descriptor.WriteSpeed).AppendLine(); + } } } @@ -6530,22 +6533,38 @@ namespace DiscImageChef.Decoders.SCSI { bool isSubpage = (modeResponse[offset] & 0x40) == 0x40; ModePage pg = new ModePage(); + byte pageNo = (byte)(modeResponse[offset] & 0x3F); - if (isSubpage) - { - pg.PageResponse = new byte[(modeResponse[offset + 2] << 8) + modeResponse[offset + 3] + 4]; + if (pageNo == 0) + { + pg.PageResponse = new byte[modeResponse.Length - offset]; Array.Copy(modeResponse, offset, pg.PageResponse, 0, pg.PageResponse.Length); - pg.Page = (byte)(modeResponse[offset] & 0x3F); - pg.Subpage = modeResponse[offset + 1]; + pg.Page = 0; + pg.Subpage = 0; offset += pg.PageResponse.Length; } else { - pg.PageResponse = new byte[modeResponse[offset + 1] + 2]; - Array.Copy(modeResponse, offset, pg.PageResponse, 0, pg.PageResponse.Length); - pg.Page = (byte)(modeResponse[offset] & 0x3F); - pg.Subpage = 0; - offset += pg.PageResponse.Length; + if (isSubpage) + { + pg.PageResponse = new byte[(modeResponse[offset + 2] << 8) + modeResponse[offset + 3] + 4]; + if ((pg.PageResponse.Length + offset) > modeResponse.Length) + return decoded; + Array.Copy(modeResponse, offset, pg.PageResponse, 0, pg.PageResponse.Length); + pg.Page = (byte)(modeResponse[offset] & 0x3F); + pg.Subpage = modeResponse[offset + 1]; + offset += pg.PageResponse.Length; + } + else + { + pg.PageResponse = new byte[modeResponse[offset + 1] + 2]; + if ((pg.PageResponse.Length + offset) > modeResponse.Length) + return decoded; + Array.Copy(modeResponse, offset, pg.PageResponse, 0, pg.PageResponse.Length); + pg.Page = (byte)(modeResponse[offset] & 0x3F); + pg.Subpage = 0; + offset += pg.PageResponse.Length; + } } listpages.Add(pg); @@ -6587,30 +6606,42 @@ namespace DiscImageChef.Decoders.SCSI { bool isSubpage = (modeResponse[offset] & 0x40) == 0x40; ModePage pg = new ModePage(); + byte pageNo = (byte)(modeResponse[offset] & 0x3F); - if (isSubpage) + if (pageNo == 0) { - pg.PageResponse = new byte[(modeResponse[offset + 2] << 8) + modeResponse[offset + 3] + 4]; - - if ((pg.PageResponse.Length + offset) > modeResponse.Length) - return decoded; - + pg.PageResponse = new byte[modeResponse.Length - offset]; Array.Copy(modeResponse, offset, pg.PageResponse, 0, pg.PageResponse.Length); - pg.Page = (byte)(modeResponse[offset] & 0x3F); - pg.Subpage = modeResponse[offset + 1]; + pg.Page = 0; + pg.Subpage = 0; offset += pg.PageResponse.Length; } else { - pg.PageResponse = new byte[modeResponse[offset + 1] + 2]; + if (isSubpage) + { + pg.PageResponse = new byte[(modeResponse[offset + 2] << 8) + modeResponse[offset + 3] + 4]; - if ((pg.PageResponse.Length + offset) > modeResponse.Length) - return decoded; + if ((pg.PageResponse.Length + offset) > modeResponse.Length) + return decoded; - Array.Copy(modeResponse, offset, pg.PageResponse, 0, pg.PageResponse.Length); - pg.Page = (byte)(modeResponse[offset] & 0x3F); - pg.Subpage = 0; - offset += pg.PageResponse.Length; + Array.Copy(modeResponse, offset, pg.PageResponse, 0, pg.PageResponse.Length); + pg.Page = (byte)(modeResponse[offset] & 0x3F); + pg.Subpage = modeResponse[offset + 1]; + offset += pg.PageResponse.Length; + } + else + { + pg.PageResponse = new byte[modeResponse[offset + 1] + 2]; + + if ((pg.PageResponse.Length + offset) > modeResponse.Length) + return decoded; + + Array.Copy(modeResponse, offset, pg.PageResponse, 0, pg.PageResponse.Length); + pg.Page = (byte)(modeResponse[offset] & 0x3F); + pg.Subpage = 0; + offset += pg.PageResponse.Length; + } } listpages.Add(pg); diff --git a/DiscImageChef.Devices/ChangeLog b/DiscImageChef.Devices/ChangeLog index 9081362f..8610eda9 100644 --- a/DiscImageChef.Devices/ChangeLog +++ b/DiscImageChef.Devices/ChangeLog @@ -1,3 +1,11 @@ +2016-02-03 Natalia Portillo + + * Device/Constructor.cs: + Corrected detecting USB or FireWire attached CD/DVD/BD and + tape drives. + Try ATA identify on USB or FireWire that don't have SCSI + INQUIRY. + 2016-01-15 Natalia Portillo * Device/ScsiCommands/SSC.cs: diff --git a/DiscImageChef.Devices/Device/Constructor.cs b/DiscImageChef.Devices/Device/Constructor.cs index 1318c6dd..3d6064c1 100644 --- a/DiscImageChef.Devices/Device/Constructor.cs +++ b/DiscImageChef.Devices/Device/Constructor.cs @@ -111,7 +111,7 @@ namespace DiscImageChef.Devices #region USB if(platformID == DiscImageChef.Interop.PlatformID.Linux) { - if(devicePath.StartsWith("/dev/sd")) + if(devicePath.StartsWith("/dev/sd") || devicePath.StartsWith("/dev/sr") || devicePath.StartsWith("/dev/st")) { string devPath = devicePath.Substring(5); if(System.IO.Directory.Exists("/sys/block/" + devPath)) @@ -185,7 +185,7 @@ namespace DiscImageChef.Devices #region FireWire if(platformID == DiscImageChef.Interop.PlatformID.Linux) { - if(devicePath.StartsWith("/dev/sd")) + if(devicePath.StartsWith("/dev/sd") || devicePath.StartsWith("/dev/sr") || devicePath.StartsWith("/dev/st")) { string devPath = devicePath.Substring(5); if(System.IO.Directory.Exists("/sys/block/" + devPath)) @@ -251,23 +251,29 @@ namespace DiscImageChef.Devices Decoders.SCSI.Inquiry.SCSIInquiry? Inquiry = Decoders.SCSI.Inquiry.Decode(inqBuf); type = DeviceType.SCSI; - bool sense = ScsiInquiry(out inqBuf, out senseBuf, 0x80); - if (!sense) + bool serialSense = ScsiInquiry(out inqBuf, out senseBuf, 0x80); + if (!serialSense) serial = Decoders.SCSI.EVPD.DecodePage80(inqBuf); - + if (Inquiry.HasValue) { - revision = StringHandlers.CToString(Inquiry.Value.ProductRevisionLevel).Trim(); - model = StringHandlers.CToString(Inquiry.Value.ProductIdentification).Trim(); - manufacturer = StringHandlers.CToString(Inquiry.Value.VendorIdentification).Trim(); + string tmp = StringHandlers.CToString(Inquiry.Value.ProductRevisionLevel); + if(tmp != null) + revision = tmp.Trim(); + tmp = StringHandlers.CToString(Inquiry.Value.ProductIdentification); + if(tmp != null) + model = tmp.Trim(); + tmp = StringHandlers.CToString(Inquiry.Value.VendorIdentification); + if(tmp != null) + manufacturer = tmp.Trim(); removable = Inquiry.Value.RMB; scsiType = (Decoders.SCSI.PeripheralDeviceTypes)Inquiry.Value.PeripheralDeviceType; } - sense = AtapiIdentify(out ataBuf, out errorRegisters); + bool atapiSense = AtapiIdentify(out ataBuf, out errorRegisters); - if (!sense) + if (!atapiSense) { type = DeviceType.ATAPI; Identify.IdentifyDevice? ATAID = Identify.Decode(ataBuf); @@ -277,10 +283,10 @@ namespace DiscImageChef.Devices } } - if (scsiSense || manufacturer == "ATA") + if ((scsiSense && (usb || firewire)) || manufacturer == "ATA") { - bool sense = AtaIdentify(out ataBuf, out errorRegisters); - if (!sense) + bool ataSense = AtaIdentify(out ataBuf, out errorRegisters); + if (!ataSense) { type = DeviceType.ATA; Identify.IdentifyDevice? ATAID = Identify.Decode(ataBuf); diff --git a/DiscImageChef.DiscImages/CDRWin.cs b/DiscImageChef.DiscImages/CDRWin.cs index a9f5e430..22be54d4 100644 --- a/DiscImageChef.DiscImages/CDRWin.cs +++ b/DiscImageChef.DiscImages/CDRWin.cs @@ -919,7 +919,7 @@ namespace DiscImageChef.ImagePlugins discimage.disktype = MediaType.CDI; else if (firstaudio && data && discimage.sessions.Count > 1 && mode2) discimage.disktype = MediaType.CDPLUS; - else if ((firstdata && !data) || mode2) + else if ((firstdata && audio) || mode2) discimage.disktype = MediaType.CDROMXA; else if (!audio) discimage.disktype = MediaType.CDROM; diff --git a/DiscImageChef.DiscImages/ChangeLog b/DiscImageChef.DiscImages/ChangeLog index 6c94abeb..cec09519 100644 --- a/DiscImageChef.DiscImages/ChangeLog +++ b/DiscImageChef.DiscImages/ChangeLog @@ -1,3 +1,8 @@ +2016-02-03 Natalia Portillo + + * CDRWin.cs: + Corrected CD-ROM XA vs CD-ROM detection. + 2016-01-16 Natalia Portillo * VHD.cs: diff --git a/DiscImageChef.Partitions/AppleMap.cs b/DiscImageChef.Partitions/AppleMap.cs index 08026e43..b44f7962 100644 --- a/DiscImageChef.Partitions/AppleMap.cs +++ b/DiscImageChef.Partitions/AppleMap.cs @@ -80,6 +80,8 @@ namespace DiscImageChef.PartPlugins byte[] APMB_sector = imagePlugin.ReadSector(0); + BigEndianBitConverter.IsLittleEndian = BitConverter.IsLittleEndian; + APMB.signature = BigEndianBitConverter.ToUInt16(APMB_sector, 0x00); APMB.sector_size = BigEndianBitConverter.ToUInt16(APMB_sector, 0x02); APMB.sectors = BigEndianBitConverter.ToUInt32(APMB_sector, 0x04); @@ -91,6 +93,17 @@ namespace DiscImageChef.PartPlugins APMB.driver_size = BigEndianBitConverter.ToUInt16(APMB_sector, 0x16); APMB.operating_system = BigEndianBitConverter.ToUInt16(APMB_sector, 0x18); + DicConsole.DebugWriteLine("Apple Partition Map plugin", "APMB.signature = {0:X4}", APMB.signature); + DicConsole.DebugWriteLine("Apple Partition Map plugin", "APMB.sector_size = {0}", APMB.sector_size); + DicConsole.DebugWriteLine("Apple Partition Map plugin", "APMB.sectors = {0}", APMB.sectors); + DicConsole.DebugWriteLine("Apple Partition Map plugin", "APMB.reserved1 = {0:X4}", APMB.reserved1); + DicConsole.DebugWriteLine("Apple Partition Map plugin", "APMB.reserved2 = {0:X4}", APMB.reserved2); + DicConsole.DebugWriteLine("Apple Partition Map plugin", "APMB.reserved3 = {0:X8}", APMB.reserved3); + DicConsole.DebugWriteLine("Apple Partition Map plugin", "APMB.driver_entries = {0}", APMB.driver_entries); + DicConsole.DebugWriteLine("Apple Partition Map plugin", "APMB.first_driver_blk = {0}", APMB.first_driver_blk); + DicConsole.DebugWriteLine("Apple Partition Map plugin", "APMB.driver_size = {0}", APMB.driver_size); + DicConsole.DebugWriteLine("Apple Partition Map plugin", "APMB.operating_system = {0}", APMB.operating_system); + ulong first_sector = 0; if (APMB.signature == APM_MAGIC) // APM boot block found, APM starts in next sector diff --git a/DiscImageChef.Partitions/ChangeLog b/DiscImageChef.Partitions/ChangeLog index 6269ed98..d17abe6e 100644 --- a/DiscImageChef.Partitions/ChangeLog +++ b/DiscImageChef.Partitions/ChangeLog @@ -1,3 +1,9 @@ +2016-02-03 Natalia Portillo + + * AppleMap.cs: + Corrected big endian working. + Added debug output. + 2015-10-19 Natalia Portillo * DiscImageChef.Partitions.csproj: diff --git a/DiscImageChef.Settings/ChangeLog b/DiscImageChef.Settings/ChangeLog new file mode 100644 index 00000000..609e2e82 --- /dev/null +++ b/DiscImageChef.Settings/ChangeLog @@ -0,0 +1,45 @@ +2016-02-03 Natalia Portillo + + * Settings.cs: + * docs/README.txt: + * packages.config: + * docs/LICENSE.txt: + * docs/ChangeLog.txt: + * docs/mono/index.xml: + * docs/html/index.html: + * Properties/AssemblyInfo.cs: + * DiscImageChef.Settings.csproj: + * docs/mono/ns-Claunia.PropertyList.xml: + * docs/mono/Claunia.PropertyList/UID.xml: + * docs/html/Claunia.PropertyList/UID.html: + * docs/mono/Claunia.PropertyList/NSSet.xml: + * docs/mono/Claunia.PropertyList/NSDate.xml: + * docs/mono/Claunia.PropertyList/NSData.xml: + * docs/html/Claunia.PropertyList/NSSet.html: + * docs/html/Claunia.PropertyList/index.html: + * docs/html/Claunia.PropertyList/NSDate.html: + * docs/mono/Claunia.PropertyList/NSArray.xml: + * docs/html/Claunia.PropertyList/NSData.html: + * docs/mono/Claunia.PropertyList/NSNumber.xml: + * docs/mono/Claunia.PropertyList/NSObject.xml: + * docs/mono/Claunia.PropertyList/NSString.xml: + * docs/html/Claunia.PropertyList/NSArray.html: + * docs/html/Claunia.PropertyList/NSNumber.html: + * docs/html/Claunia.PropertyList/NSObject.html: + * docs/html/Claunia.PropertyList/NSString.html: + * docs/mono/Claunia.PropertyList/NSDictionary.xml: + * docs/html/Claunia.PropertyList/NSDictionary.html: + * docs/mono/Claunia.PropertyList/PropertyListParser.xml: + * docs/html/Claunia.PropertyList/PropertyListParser.html: + * docs/mono/Claunia.PropertyList/XmlPropertyListParser.xml: + * docs/html/Claunia.PropertyList/XmlPropertyListParser.html: + * docs/mono/Claunia.PropertyList/ASCIIPropertyListParser.xml: + * docs/mono/Claunia.PropertyList/BinaryPropertyListWriter.xml: + * docs/html/Claunia.PropertyList/ASCIIPropertyListParser.html: + * docs/mono/Claunia.PropertyList/BinaryPropertyListParser.xml: + * docs/html/Claunia.PropertyList/BinaryPropertyListWriter.html: + * docs/html/Claunia.PropertyList/BinaryPropertyListParser.html: + * docs/mono/Claunia.PropertyList/PropertyListFormatException.xml: + * docs/html/Claunia.PropertyList/PropertyListFormatException.html: + Added supports for settings + diff --git a/DiscImageChef.Settings/DiscImageChef.Settings.csproj b/DiscImageChef.Settings/DiscImageChef.Settings.csproj new file mode 100644 index 00000000..1bf2bcd0 --- /dev/null +++ b/DiscImageChef.Settings/DiscImageChef.Settings.csproj @@ -0,0 +1,90 @@ + + + + Debug + AnyCPU + 8.0.30703 + 2.0 + {5C4C7BAA-CF60-4233-84ED-39CB2312AF38} + Library + DiscImageChef.Settings + DiscImageChef.Settings + 2.2 + + + true + full + false + bin\Debug + DEBUG; + prompt + 4 + false + + + true + bin\Release + prompt + 4 + false + + + + + + + ..\packages\plist-cil.1.14\lib\plist-cil.dll + + + + + + + + + {9183F2E0-A879-4F23-9EE3-C6908F1332B2} + DiscImageChef.Interop + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/DiscImageChef.Settings/Properties/AssemblyInfo.cs b/DiscImageChef.Settings/Properties/AssemblyInfo.cs new file mode 100644 index 00000000..5c4ead8d --- /dev/null +++ b/DiscImageChef.Settings/Properties/AssemblyInfo.cs @@ -0,0 +1,64 @@ +// /*************************************************************************** +// The Disc Image Chef +// ---------------------------------------------------------------------------- +// +// Filename : AssemblyInfo.cs +// Version : 1.0 +// Author(s) : Natalia Portillo +// +// Component : Component +// +// Revision : $Revision$ +// Last change by : $Author$ +// Date : $Date$ +// +// --[ Description ] ---------------------------------------------------------- +// +// Description +// +// --[ License ] -------------------------------------------------------------- +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as +// published by the Free Software Foundation, either version 3 of the +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +// ---------------------------------------------------------------------------- +// Copyright (C) 2011-2015 Claunia.com +// ****************************************************************************/ +// //$Id$ +using System.Reflection; +using System.Runtime.CompilerServices; + +// Information about this assembly is defined by the following attributes. +// Change them to the values specific to your project. + +[assembly: AssemblyTitle ("DiscImageChef.Settings")] +[assembly: AssemblyDescription ("")] +[assembly: AssemblyConfiguration ("")] +[assembly: AssemblyCompany ("Claunia.com")] +[assembly: AssemblyProduct ("")] +[assembly: AssemblyCopyright ("© Claunia.com")] +[assembly: AssemblyTrademark ("")] +[assembly: AssemblyCulture ("")] + +// The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}". +// The form "{Major}.{Minor}.*" will automatically update the build and revision, +// and "{Major}.{Minor}.{Build}.*" will update just the revision. + +[assembly: AssemblyVersion ("1.0.*")] + +// The following attributes are used to specify the signing key for the assembly, +// if desired. See the Mono documentation for more information about signing. + +//[assembly: AssemblyDelaySign(false)] +//[assembly: AssemblyKeyFile("")] + diff --git a/DiscImageChef.Settings/Settings.cs b/DiscImageChef.Settings/Settings.cs new file mode 100644 index 00000000..cced10a4 --- /dev/null +++ b/DiscImageChef.Settings/Settings.cs @@ -0,0 +1,489 @@ +// /*************************************************************************** +// The Disc Image Chef +// ---------------------------------------------------------------------------- +// +// Filename : MyClass.cs +// Version : 1.0 +// Author(s) : Natalia Portillo +// +// Component : Component +// +// Revision : $Revision$ +// Last change by : $Author$ +// Date : $Date$ +// +// --[ Description ] ---------------------------------------------------------- +// +// Description +// +// --[ License ] -------------------------------------------------------------- +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as +// published by the Free Software Foundation, either version 3 of the +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +// ---------------------------------------------------------------------------- +// Copyright (C) 2011-2015 Claunia.com +// ****************************************************************************/ +// //$Id$ +using System; +using System.IO; +using System.Xml.Serialization; +using DiscImageChef.Interop; +using Microsoft.Win32; +using Claunia.PropertyList; + +namespace DiscImageChef.Settings +{ + public class DicSettings + { + public StatsSettings Stats; + public bool SaveReportsGlobally; + public bool ShareReports; + } + + public class UserSettings + { + public string Name; + public string Email; + } + + public class StatsSettings + { + public bool ShareStats; + public bool BenchmarkStats; + public bool CommandStats; + public bool DeviceStats; + public bool FilesystemStats; + public bool MediaImageStats; + public bool MediaScanStats; + public bool PartitionStats; + public bool MediaStats; + public bool VerifyStats; + } + + public static class Settings + { + public static DicSettings Current; + static string reportsPath; + static string statsPath; + + public static string ReportsPath + { + get + { + return reportsPath; + } + } + + public static string StatsPath + { + get + { + return statsPath; + } + } + + public static void LoadSettings() + { + Current = new DicSettings(); + Interop.PlatformID ptID = DetectOS.GetRealPlatformID(); + + try + { + switch (ptID) + { + case Interop.PlatformID.MacOSX: + case Interop.PlatformID.iOS: + { + string appSupportPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), "Library", "Application Support", "Claunia.com"); + if (!Directory.Exists(appSupportPath)) + Directory.CreateDirectory(appSupportPath); + + string dicPath = Path.Combine(appSupportPath, "DiscImageChef"); + if (!Directory.Exists(dicPath)) + Directory.CreateDirectory(dicPath); + + reportsPath = Path.Combine(dicPath, "Reports"); + if (!Directory.Exists(reportsPath)) + Directory.CreateDirectory(reportsPath); + + statsPath = Path.Combine(dicPath, "Statistics"); + if (!Directory.Exists(statsPath)) + Directory.CreateDirectory(statsPath); + } + break; + case Interop.PlatformID.Win32NT: + case Interop.PlatformID.Win32S: + case Interop.PlatformID.Win32Windows: + case Interop.PlatformID.WinCE: + case Interop.PlatformID.WindowsPhone: + { + string appSupportPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "Claunia.com"); + if (!Directory.Exists(appSupportPath)) + Directory.CreateDirectory(appSupportPath); + + string dicPath = Path.Combine(appSupportPath, "DiscImageChef"); + if (!Directory.Exists(dicPath)) + Directory.CreateDirectory(dicPath); + + reportsPath = Path.Combine(dicPath, "Reports"); + if (!Directory.Exists(reportsPath)) + Directory.CreateDirectory(reportsPath); + + statsPath = Path.Combine(dicPath, "Statistics"); + if (!Directory.Exists(statsPath)) + Directory.CreateDirectory(statsPath); + } + break; + default: + { + string appSupportPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), ".claunia.com"); + if (!Directory.Exists(appSupportPath)) + Directory.CreateDirectory(appSupportPath); + + string dicPath = Path.Combine(appSupportPath, "DiscImageChef"); + if (!Directory.Exists(dicPath)) + Directory.CreateDirectory(dicPath); + + reportsPath = Path.Combine(dicPath, "Reports"); + if (!Directory.Exists(reportsPath)) + Directory.CreateDirectory(reportsPath); + + statsPath = Path.Combine(dicPath, "Statistics"); + if (!Directory.Exists(statsPath)) + Directory.CreateDirectory(statsPath); + } + break; + } + } + catch + { + reportsPath = null; + } + + try + { + switch (ptID) + { + case Interop.PlatformID.MacOSX: + case Interop.PlatformID.iOS: + { + string preferencesPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), "Library", "Preferences"); + string preferencesFilePath = Path.Combine(preferencesPath, "com.claunia.discimagechef.plist"); + + if (!File.Exists(preferencesFilePath)) + { + SetDefaultSettings(); + SaveSettings(); + } + + NSDictionary parsedPreferences = (NSDictionary)BinaryPropertyListParser.Parse(new FileInfo(preferencesFilePath)); + if (parsedPreferences != null) + { + NSObject obj; + + if (parsedPreferences.TryGetValue("SaveReportsGlobally", out obj)) + { + Current.SaveReportsGlobally = ((NSNumber)obj).ToBool(); + } + else + Current.SaveReportsGlobally = false; + + if (parsedPreferences.TryGetValue("ShareReports", out obj)) + { + Current.ShareReports = ((NSNumber)obj).ToBool(); + } + else + Current.ShareReports = false; + + NSDictionary stats; + if (parsedPreferences.TryGetValue("Stats", out obj)) + { + stats = (NSDictionary)obj; + + if (stats != null) + { + NSObject obj2; + Current.Stats = new StatsSettings(); + + if (stats.TryGetValue("ShareStats", out obj2)) + { + Current.Stats.ShareStats = ((NSNumber)obj2).ToBool(); + } + else + Current.Stats.ShareStats = false; + + if (stats.TryGetValue("BenchmarkStats", out obj2)) + { + Current.Stats.BenchmarkStats = ((NSNumber)obj2).ToBool(); + } + else + Current.Stats.BenchmarkStats = false; + + if (stats.TryGetValue("CommandStats", out obj2)) + { + Current.Stats.CommandStats = ((NSNumber)obj2).ToBool(); + } + else + Current.Stats.CommandStats = false; + + if (stats.TryGetValue("DeviceStats", out obj2)) + { + Current.Stats.DeviceStats = ((NSNumber)obj2).ToBool(); + } + else + Current.Stats.DeviceStats = false; + + if (stats.TryGetValue("FilesystemStats", out obj2)) + { + Current.Stats.FilesystemStats = ((NSNumber)obj2).ToBool(); + } + else + Current.Stats.FilesystemStats = false; + + if (stats.TryGetValue("MediaImageStats", out obj2)) + { + Current.Stats.MediaImageStats = ((NSNumber)obj2).ToBool(); + } + else + Current.Stats.MediaImageStats = false; + + if (stats.TryGetValue("MediaScanStats", out obj2)) + { + Current.Stats.MediaScanStats = ((NSNumber)obj2).ToBool(); + } + else + Current.Stats.MediaScanStats = false; + + if (stats.TryGetValue("PartitionStats", out obj2)) + { + Current.Stats.PartitionStats = ((NSNumber)obj2).ToBool(); + } + else + Current.Stats.PartitionStats = false; + + if (stats.TryGetValue("MediaStats", out obj2)) + { + Current.Stats.MediaStats = ((NSNumber)obj2).ToBool(); + } + else + Current.Stats.MediaStats = false; + + if (stats.TryGetValue("VerifyStats", out obj2)) + { + Current.Stats.VerifyStats = ((NSNumber)obj2).ToBool(); + } + else + Current.Stats.VerifyStats = false; + } + } + else + Current.Stats = null; + } + else + { + SetDefaultSettings(); + SaveSettings(); + } + } + break; + case Interop.PlatformID.Win32NT: + case Interop.PlatformID.Win32S: + case Interop.PlatformID.Win32Windows: + case Interop.PlatformID.WinCE: + case Interop.PlatformID.WindowsPhone: + { + RegistryKey parentKey = Registry.CurrentUser.OpenSubKey("SOFTWARE").OpenSubKey("Claunia.com"); + if (parentKey == null) + { + SetDefaultSettings(); + SaveSettings(); + return; + } + + RegistryKey key = parentKey.OpenSubKey("DiscImageChef"); + if (key == null) + { + SetDefaultSettings(); + SaveSettings(); + return; + } + + Current.SaveReportsGlobally = Convert.ToBoolean(key.GetValue("SaveReportsGlobally")); + Current.ShareReports = Convert.ToBoolean(key.GetValue("ShareReports")); + + bool stats = Convert.ToBoolean(key.GetValue("Statistics")); + if (stats) + { + Current.Stats = new StatsSettings(); + Current.Stats.ShareStats = Convert.ToBoolean(key.GetValue("ShareStats")); + Current.Stats.BenchmarkStats = Convert.ToBoolean(key.GetValue("BenchmarkStats")); + Current.Stats.CommandStats = Convert.ToBoolean(key.GetValue("CommandStats")); + Current.Stats.DeviceStats = Convert.ToBoolean(key.GetValue("DeviceStats")); + Current.Stats.FilesystemStats = Convert.ToBoolean(key.GetValue("FilesystemStats")); + Current.Stats.MediaImageStats = Convert.ToBoolean(key.GetValue("MediaImageStats")); + Current.Stats.MediaScanStats = Convert.ToBoolean(key.GetValue("MediaScanStats")); + Current.Stats.PartitionStats = Convert.ToBoolean(key.GetValue("PartitionStats")); + Current.Stats.MediaStats = Convert.ToBoolean(key.GetValue("MediaStats")); + Current.Stats.VerifyStats = Convert.ToBoolean(key.GetValue("VerifyStats")); + } + } + break; + // TODO: Use the Registry + default: + { + string configPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), ".config"); + string settingsPath = Path.Combine(configPath, "DiscImageChef.xml"); + + if (!Directory.Exists(configPath)) + { + SetDefaultSettings(); + SaveSettings(); + return; + } + + XmlSerializer xs = new XmlSerializer(Current.GetType()); + StreamReader sr = new StreamReader(settingsPath); + Current = (DicSettings)xs.Deserialize(sr); + } + break; + } + } + catch + { + SetDefaultSettings(); + SaveSettings(); + } + } + + public static void SaveSettings() + { + try + { + Interop.PlatformID ptID = DetectOS.GetRealPlatformID(); + + switch (ptID) + { + case Interop.PlatformID.MacOSX: + case Interop.PlatformID.iOS: + { + NSDictionary root = new NSDictionary(); + root.Add("SaveReportsGlobally", Current.SaveReportsGlobally); + root.Add("ShareReports", Current.ShareReports); + if (Current.Stats != null) + { + NSDictionary stats = new NSDictionary(); + stats.Add("ShareStats", Current.Stats.ShareStats); + stats.Add("BenchmarkStats", Current.Stats.BenchmarkStats); + stats.Add("CommandStats", Current.Stats.CommandStats); + stats.Add("DeviceStats", Current.Stats.DeviceStats); + stats.Add("FilesystemStats", Current.Stats.FilesystemStats); + stats.Add("MediaImageStats", Current.Stats.MediaImageStats); + stats.Add("MediaScanStats", Current.Stats.MediaScanStats); + stats.Add("PartitionStats", Current.Stats.PartitionStats); + stats.Add("MediaStats", Current.Stats.MediaStats); + stats.Add("VerifyStats", Current.Stats.VerifyStats); + root.Add("Stats", stats); + } + + string preferencesPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), "Library", "Preferences"); + string preferencesFilePath = Path.Combine(preferencesPath, "com.claunia.discimagechef.plist"); + + FileStream fs = new FileStream(preferencesFilePath, FileMode.Create); + BinaryPropertyListWriter.Write(fs, root); + fs.Close(); + } + break; + case Interop.PlatformID.Win32NT: + case Interop.PlatformID.Win32S: + case Interop.PlatformID.Win32Windows: + case Interop.PlatformID.WinCE: + case Interop.PlatformID.WindowsPhone: + { + RegistryKey parentKey = Registry.CurrentUser.OpenSubKey("SOFTWARE").CreateSubKey("Claunia.com"); + RegistryKey key = parentKey.CreateSubKey("DiscImageChef"); + + key.SetValue("SaveReportsGlobally", Current.SaveReportsGlobally); + key.SetValue("ShareReports", Current.ShareReports); + + if (Current.Stats != null) + { + key.SetValue("Statistics", true); + key.SetValue("ShareStats", Current.Stats.ShareStats); + key.SetValue("BenchmarkStats", Current.Stats.BenchmarkStats); + key.SetValue("CommandStats", Current.Stats.CommandStats); + key.SetValue("DeviceStats", Current.Stats.DeviceStats); + key.SetValue("FilesystemStats", Current.Stats.FilesystemStats); + key.SetValue("MediaImageStats", Current.Stats.MediaImageStats); + key.SetValue("MediaScanStats", Current.Stats.MediaScanStats); + key.SetValue("PartitionStats", Current.Stats.PartitionStats); + key.SetValue("MediaStats", Current.Stats.MediaStats); + key.SetValue("VerifyStats", Current.Stats.VerifyStats); + } + else + { + key.SetValue("Statistics", true); + key.DeleteValue("ShareStats", false); + key.DeleteValue("BenchmarkStats", false); + key.DeleteValue("CommandStats", false); + key.DeleteValue("DeviceStats", false); + key.DeleteValue("FilesystemStats", false); + key.DeleteValue("MediaImageStats", false); + key.DeleteValue("MediaScanStats", false); + key.DeleteValue("PartitionStats", false); + key.DeleteValue("MediaStats", false); + key.DeleteValue("VerifyStats", false); + } + } + break; + default: + { + string configPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), ".config"); + string settingsPath = Path.Combine(configPath, "DiscImageChef.xml"); + + if (!Directory.Exists(configPath)) + Directory.CreateDirectory(configPath); + + FileStream fs = new FileStream(settingsPath, FileMode.Create); + XmlSerializer xs = new XmlSerializer(Current.GetType()); + xs.Serialize(fs, Current); + fs.Close(); + } + break; + } + } + catch + { + } + } + + public static void SetDefaultSettings() + { + Current = new DicSettings(); + Current.SaveReportsGlobally = true; + Current.ShareReports = true; + Current.Stats = new StatsSettings(); + Current.Stats.BenchmarkStats = true; + Current.Stats.CommandStats = true; + Current.Stats.DeviceStats = true; + Current.Stats.FilesystemStats = true; + Current.Stats.MediaImageStats = true; + Current.Stats.MediaScanStats = true; + Current.Stats.MediaStats = true; + Current.Stats.PartitionStats = true; + Current.Stats.ShareStats = true; + Current.Stats.VerifyStats = true; + } + } +} + diff --git a/DiscImageChef.Settings/docs/ChangeLog.txt b/DiscImageChef.Settings/docs/ChangeLog.txt new file mode 100644 index 00000000..17447fd4 --- /dev/null +++ b/DiscImageChef.Settings/docs/ChangeLog.txt @@ -0,0 +1,362 @@ +2015-02-24 Natalia Portillo + + * PropertyListParser.cs: + * ASCIIPropertyListParser.cs: + Sync BOM skipping code with upstream. + + * BinaryPropertyListParser.cs: + Sync code with upstream. + Added UTF-8 string decoding on binary property lists. + + * plist-cil.csproj: + * Properties/AssemblyInfo.cs: + Bump to 1.14 (upstream r114). + +2015-02-20 Natalia Portillo + + * UID.cs: + * NSSet.cs: + * NSData.cs: + * NSArray.cs: + * NSString.cs: + * NSNumber.cs: + * NSObject.cs: + * NSDictionary.cs: + * PropertyListParser.cs: + * BinaryPropertyListWriter.cs: + * BinaryPropertyListParser.cs: + Prettify documentation. + +2015-02-20 Natalia Portillo + + * NSObject.cs: + * ASCIIPropertyListParser.cs: + Modify some JavaDoc to Xml. + +2015-02-20 Natalia Portillo + + * NSDictionary.cs: + Implement NSDictionary.CopyTo() + +2015-02-20 Natalia Portillo + + * UID.cs: + * NSSet.cs: + * NSDate.cs: + * NSData.cs: + * NSArray.cs: + * NSString.cs: + * NSObject.cs: + * NSNumber.cs: + * NSDictionary.cs: + * ASCIIPropertyListParser.cs: + * BinaryPropertyListParser.cs: + * BinaryPropertyListWriter.cs: + Added all missing documentation for public methods. + +2015-02-20 Natalia Portillo + + * NSDate.cs: + * NSObject.cs: + * NSNumber.cs: + * ASCIIPropertyListParser.cs: + * BinaryPropertyListParser.cs: + Remove unused variables and disable warnings that we know + are innocuous. + +2015-02-20 Natalia Portillo + + * plist-cil.csproj: + Added ZIPing release. + +2015-02-20 Natalia Portillo + + * plist-cil.csproj: + Added automatic HTML and MonoDoc documentation generation + for Release. + +2015-02-20 Natalia Portillo + + * plist-cil.csproj: + Add ChangeLog so it is copied on build. + +2015-02-20 Natalia Portillo + + * plist-cil.csproj: + Added README. + +2015-02-20 Natalia Portillo + + * plist-cil.csproj: + Added MIT License file. + +2015-02-20 Natalia Portillo + + * ASCIIPropertyListParser.cs: + Remove redundant items. + Correct same ASCII exceptionfallback issue that appeared in + NSString. + + * UID.cs: + * NSSet.cs: + * NSDate.cs: + * NSData.cs: + * NSArray.cs: + * NSObject.cs: + * NSNumber.cs: + * NSString.cs: + * NSDictionary.cs: + * PropertyListParser.cs: + * XmlPropertyListParser.cs: + * BinaryPropertyListWriter.cs: + * BinaryPropertyListParser.cs: + Remove redundant items. + +2015-02-20 Natalia Portillo + + * UID.cs: + * NSSet.cs: + * NSDate.cs: + * NSData.cs: + * NSArray.cs: + * NSString.cs: + * NSObject.cs: + * NSNumber.cs: + * NSDictionary.cs: + * PropertyListParser.cs: + * XmlPropertyListParser.cs: + * ASCIIPropertyListParser.cs: + * BinaryPropertyListWriter.cs: + * BinaryPropertyListParser.cs: + * PropertyListFormatException.cs: + Reformat code. + +2015-02-19 Natalia Portillo + + * UID.cs: + * NSSet.cs: + * NSDate.cs: + * NSData.cs: + * NSArray.cs: + * NSString.cs: + * NSObject.cs: + * NSNumber.cs: + * NSDictionary.cs: + * PropertyListParser.cs: + * XmlPropertyListParser.cs: + * ASCIIPropertyListParser.cs: + * BinaryPropertyListWriter.cs: + * BinaryPropertyListParser.cs: + * PropertyListFormatException.cs: + me is @author also :p + +2015-02-19 Natalia Portillo + + * NSString.cs: + Mono encoding fallback for ASCII is not failing on all + non-ASCII characters (as in issue4.plist test file). + Implemented a simple checker. + +2015-02-19 Natalia Portillo + + * PropertyListParser.cs: + Solve upstream bug, does not recognize UTF-8 XML with + byte-order-mask as XML. + +2015-02-19 Natalia Portillo + + * NSNumber.cs: + More culture corrections. + +2015-02-19 Natalia Portillo + + * NSNumber.cs: + double.ToString() should be invariantculture also. + +2015-02-19 Natalia Portillo + + * UID.cs: + * NSSet.cs: + * NSDate.cs: + * NSData.cs: + * NSArray.cs: + * NSString.cs: + * NSNumber.cs: + * NSObject.cs: + * NSDictionary.cs: + Implement correct equality comparisors. + +2015-02-19 Natalia Portillo + + * XmlPropertyListParser.cs: + Typo. + +2015-02-19 Natalia Portillo + + * NSNumber.cs: + Parse decimal comma always as '.'. + +2015-02-19 Natalia Portillo + + * NSData.cs: + * NSArray.cs: + * NSObject.cs: + * NSDictionary.cs: + * ASCIIPropertyListParser.cs: + Convert unix date to .net dates. + Array.Equals() does not compare array internals but object + reference, implement substitute. + String.Substring() has a different API than Java, correct. + +2015-02-19 Natalia Portillo + + * plist-cil.csproj: + * PropertyListParser.cs: + * XmlPropertyListParser.cs: + Implement XmlPropertyListParser + +2015-02-19 Natalia Portillo + + * UID.cs: + * NSData.cs: + * NSDate.cs: + * NSArray.cs: + * NSNumber.cs: + * NSString.cs: + * NSObject.cs: + * NSDictionary.cs: + * plist-cil.csproj: + * PropertyListParser.cs: + * BinaryPropertyListWriter.cs: + Implement BinaryPropertyListWriter. + + * NSSet.cs: + * BinaryPropertyListParser.cs: + Implement BinaryPropertyListWriter. + Add way to make ordered NSSet. + +2015-02-19 Natalia Portillo + + * NSDate.cs: + * NSNumber.cs: + * plist-cil.csproj: + * PropertyListParser.cs: + * BinaryPropertyListParser.cs: + Implement BinaryPropertyListParser. + +2015-02-19 Natalia Portillo + + * UID.cs: + * NSSet.cs: + * NSDate.cs: + * NSData.cs: + * NSArray.cs: + * NSNumber.cs: + * NSObject.cs: + * NSString.cs: + * NSDictionary.cs: + * plist-cil.csproj: + * PropertyListParser.cs: + * ASCIIPropertyListParser.cs: + Implement ASCIIPropertyListParser + +2015-02-18 Natalia Portillo + + * plist-cil.csproj: + * PropertyListParser.cs: + Implement PropertyListParser + +2015-02-18 Natalia Portillo + + * NSSet.cs: + * NSArray.cs: + * NSObject.cs: + * NSDictionary.cs: + Implement NSObject to .NET Object and all methods on all + classes that depended on NSObject<->Object + +2015-02-18 Natalia Portillo + + * NSObject.cs: + Implement .NET to NSObject castings + +2015-02-18 Natalia Portillo + + * plist-cil.csproj: + * PropertyListFormatException.cs: + Implement PropertyListFormatException + +2015-02-18 Natalia Portillo + + * NSObject.cs: + * NSDictionary.cs: + * plist-cil.csproj: + Implement NSDictionary + +2015-02-18 Natalia Portillo + + * NSData.cs: + * NSObject.cs: + * plist-cil.csproj: + Implement NSData. + +2015-02-18 Natalia Portillo + + * NSArray.cs: + * NSObject.cs: + * plist-cil.csproj: + Implements NSArray + +2015-02-18 Natalia Portillo + + * NSDate.cs: + * plist-cil.csproj: + Implemented NSDate + +2015-02-17 Natalia Portillo + + * UID.cs: + * plist-cil.csproj: + Implement UID + +2015-02-17 Natalia Portillo + + * NSSet.cs: + * NSObject.cs: + * plist-cil.csproj: + Implemented NSSet. + +2015-02-17 Natalia Portillo + + * NSString.cs: + * plist-cil.csproj: + Implement NSString. + +2015-02-17 Natalia Portillo + + * NSNumber.cs: + * NSObject.cs: + * plist-cil.csproj: + Implement NSNumber. + +2015-02-17 Natalia Portillo + + * MyClass.cs: + * NSObject.cs: + * plist-cil.csproj: + Pre-implement NSObject. + +2015-02-16 Natalia Portillo + + * ChangeLog: + * plist-cil.csproj: + * Properties/AssemblyInfo.cs: + Initial commit + +2015-02-16 Natalia Portillo + + * MyClass.cs: + * plist-cil.csproj: + * Properties/AssemblyInfo.cs: + Initial commit + diff --git a/DiscImageChef.Settings/docs/LICENSE.txt b/DiscImageChef.Settings/docs/LICENSE.txt new file mode 100644 index 00000000..2548751d --- /dev/null +++ b/DiscImageChef.Settings/docs/LICENSE.txt @@ -0,0 +1,22 @@ +Copyright (c) 2015 Natalia Portillo + +Based on dd-plist, +Copyright (c) 2014 Daniel Dreibrodt + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/DiscImageChef.Settings/docs/README.txt b/DiscImageChef.Settings/docs/README.txt new file mode 100644 index 00000000..09f88f15 --- /dev/null +++ b/DiscImageChef.Settings/docs/README.txt @@ -0,0 +1,33 @@ +#plist-cil +This library enables .NET (CLR) applications to work with property lists in various formats. +It is mostly based on [dd-plist for Java](https://code.google.com/p/plist/). + +You can parse existing property lists (e.g. those created by an iOS application) and work with the contents on any operating system. + +The library also enables you to create your own property lists from scratch and store them in various formats. + +The provided API mimics the Cocoa/NeXTSTEP API, and where applicable, the .NET API, granting access to the basic functions of classes like NSDictionary, NSData, etc. + +###Supported formats + +| Format | Read | Write | +| ---------------------- | ---- | ----- | +| OS X / iOS XML | yes | yes | +| OS X / iOS Binary (v0) | yes | yes | +| OS X / iOS ASCII | yes | yes | +| GNUstep ASCII | yes | yes | + +###Requirements +.NET Framework 4.0 or Mono. + +###Download + +The latest releases can be downloaded [here](https://github.com/claunia/plist-cil/releases): + +###NuGet support +Coming soon...... + +###Help +The API documentation is included in the download. + +When you encounter a bug please report it by on the [issue tracker](https://github.com/claunia/plist-cil/issues). diff --git a/DiscImageChef.Settings/docs/html/Claunia.PropertyList/ASCIIPropertyListParser.html b/DiscImageChef.Settings/docs/html/Claunia.PropertyList/ASCIIPropertyListParser.html new file mode 100644 index 00000000..59bd0d96 --- /dev/null +++ b/DiscImageChef.Settings/docs/html/Claunia.PropertyList/ASCIIPropertyListParser.html @@ -0,0 +1,1612 @@ + + + Claunia.PropertyList.ASCIIPropertyListParser + + + + + + + +

ASCIIPropertyListParser Class

+

+

+ Parser for ASCII property lists. Supports Apple OS X/iOS and GnuStep/NeXTSTEP format. + This parser is based on the recursive descent paradigm, but the underlying grammar + is not explicitely defined. +

+

+ Resources on ASCII property list format: +

+

+ https://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/PropertyLists/OldStylePlists/OldStylePLists.html +

+

+ Property List Programming Guide - Old-Style ASCII Property Lists +

+

+ http://www.gnustep.org/resources/documentation/Developer/Base/Reference/NSPropertyList.html +

+

+ GnuStep - NSPropertyListSerialization class documentation +

+

+
+

Syntax

+
public class ASCIIPropertyListParser
+
+
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+

Members

+
+

+ See Also: Inherited members from + object. +

+

Protected Constructors

+
+
+ + + + + + +
+
+
+
+ + + Documentation for this section has not yet been entered. +
+
+
+

Public Fields

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
const
+
+ + ARRAY_BEGIN_TOKEN + + + + char + . + Token of NSArray start +
+
const
+
+ + ARRAY_END_TOKEN + + + + char + . + Token of NSArray end +
+
const
+
+ + ARRAY_ITEM_DELIMITER_TOKEN + + + + char + . + Token of NSArray item delimiter +
+
const
+
+ + COMMENT_BEGIN_TOKEN + + + + char + . + Token for comment start +
+
const
+
+ + DATA_BEGIN_TOKEN + + + + char + . + Token of NSData start +
+
const
+
+ + DATA_END_TOKEN + + + + char + . + Token of NSData end +
+
const
+
+ + DATA_GSBOOL_BEGIN_TOKEN + + + + char + . + Token of GSBoolean start +
+
const
+
+ + DATA_GSBOOL_FALSE_TOKEN + + + + char + . + Token for GSBoolen's false
+
const
+
+ + DATA_GSBOOL_TRUE_TOKEN + + + + char + . + Token for GSBoolen's true
+
const
+
+ + DATA_GSDATE_BEGIN_TOKEN + + + + char + . + Token of GSDate start +
+
const
+
+ + DATA_GSINT_BEGIN_TOKEN + + + + char + . + Token for GSInteger +
+
const
+
+ + DATA_GSOBJECT_BEGIN_TOKEN + + + + char + . + Token of GSObject start +
+
const
+
+ + DATA_GSREAL_BEGIN_TOKEN + + + + char + . + Token for GSReal +
+
const
+
+ + DATE_APPLE_DATE_TIME_DELIMITER + + + + char + . + Token for NSDate date and time delimiter +
+
const
+
+ + DATE_APPLE_END_TOKEN + + + + char + . + Token for NSDate end +
+
const
+
+ + DATE_DATE_FIELD_DELIMITER + + + + char + . + Token for NSDate date field delimited +
+
const
+
+ + DATE_GS_DATE_TIME_DELIMITER + + + + char + . + Token for GSDate date and time delimiter +
+
const
+
+ + DATE_TIME_FIELD_DELIMITER + + + + char + . + Token for NSDate time field delimiter +
+
const
+
+ + DICTIONARY_ASSIGN_TOKEN + + + + char + . + Token of NSDictionary assignment +
+
const
+
+ + DICTIONARY_BEGIN_TOKEN + + + + char + . + Token of NSDictionary start +
+
const
+
+ + DICTIONARY_END_TOKEN + + + + char + . + Token of NSDictionary end +
+
const
+
+ + DICTIONARY_ITEM_DELIMITER_TOKEN + + + + char + . + Token of NSDictionary item delimiter +
+
const
+
+ + MULTILINE_COMMENT_END_TOKEN + + + + char + . + End token for multiline comment +
+
const
+
+ + MULTILINE_COMMENT_SECOND_TOKEN + + + + char + . + Second token for multiline comment +
+
const
+
+ + QUOTEDSTRING_BEGIN_TOKEN + + + + char + . + Token of quoted NSString start +
+
const
+
+ + QUOTEDSTRING_END_TOKEN + + + + char + . + Token of quoted NSString end +
+
const
+
+ + QUOTEDSTRING_ESCAPE_TOKEN + + + + char + . + Token of quoted NSString escaped character +
+
const
+
+ + SINGLELINE_COMMENT_SECOND_TOKEN + + + + char + . + Second token for singleline comment +
+
const
+
+ + WHITESPACE_CARRIAGE_RETURN + + + + char + . + A carriage return +
+
const
+
+ + WHITESPACE_NEWLINE + + + + char + . + A newline +
+
const
+
+ + WHITESPACE_SPACE + + + + char + . + A space +
+
const
+
+ + WHITESPACE_TAB + + + + char + . + A tabulator +
+
+
+

Public Methods

+
+
+ + + + + + + + + + + + + + + + + + + + + +
+
+
+
+ + Parse + () : NSObject
+ Parses the property list from the beginning and returns the root object + of the property list. +
+
static
+
+ + Parse + (byte[]) : NSObject
+ Parses an ASCII property list from a byte array. +
+
static
+
+ + Parse + (System.IO.FileInfo) : NSObject
+ Parses an ASCII property list file. +
+
static
+
+ + Parse + (System.IO.Stream) : NSObject
+ Parses an ASCII property list from an input stream. +
+
static
+
+ + ParseQuotedString + (string) : string
+ Parses a string according to the format specified for ASCII property lists. + Such strings can contain escape sequences which are unescaped in this method. +
+
+
+
+
+
+

Member Details

+
+

ASCIIPropertyListParser Constructor

+
+
+ Documentation for this section has not yet been entered. +
+

Syntax

+
protected ASCIIPropertyListParser ()
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

ARRAY_BEGIN_TOKEN Field

+
+
+ Token of NSArray start +
+

Syntax

+
public const char ARRAY_BEGIN_TOKEN
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

ARRAY_END_TOKEN Field

+
+
+ Token of NSArray end +
+

Syntax

+
public const char ARRAY_END_TOKEN
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

ARRAY_ITEM_DELIMITER_TOKEN Field

+
+
+ Token of NSArray item delimiter +
+

Syntax

+
public const char ARRAY_ITEM_DELIMITER_TOKEN
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

COMMENT_BEGIN_TOKEN Field

+
+
+ Token for comment start +
+

Syntax

+
public const char COMMENT_BEGIN_TOKEN
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

DATA_BEGIN_TOKEN Field

+
+
+ Token of NSData start +
+

Syntax

+
public const char DATA_BEGIN_TOKEN
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

DATA_END_TOKEN Field

+
+
+ Token of NSData end +
+

Syntax

+
public const char DATA_END_TOKEN
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

DATA_GSBOOL_BEGIN_TOKEN Field

+
+
+ Token of GSBoolean start +
+

Syntax

+
public const char DATA_GSBOOL_BEGIN_TOKEN
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

DATA_GSBOOL_FALSE_TOKEN Field

+
+
+ Token for GSBoolen's false
+

Syntax

+
public const char DATA_GSBOOL_FALSE_TOKEN
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

DATA_GSBOOL_TRUE_TOKEN Field

+
+
+ Token for GSBoolen's true
+

Syntax

+
public const char DATA_GSBOOL_TRUE_TOKEN
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

DATA_GSDATE_BEGIN_TOKEN Field

+
+
+ Token of GSDate start +
+

Syntax

+
public const char DATA_GSDATE_BEGIN_TOKEN
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

DATA_GSINT_BEGIN_TOKEN Field

+
+
+ Token for GSInteger +
+

Syntax

+
public const char DATA_GSINT_BEGIN_TOKEN
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

DATA_GSOBJECT_BEGIN_TOKEN Field

+
+
+ Token of GSObject start +
+

Syntax

+
public const char DATA_GSOBJECT_BEGIN_TOKEN
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

DATA_GSREAL_BEGIN_TOKEN Field

+
+
+ Token for GSReal +
+

Syntax

+
public const char DATA_GSREAL_BEGIN_TOKEN
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

DATE_APPLE_DATE_TIME_DELIMITER Field

+
+
+ Token for NSDate date and time delimiter +
+

Syntax

+
public const char DATE_APPLE_DATE_TIME_DELIMITER
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

DATE_APPLE_END_TOKEN Field

+
+
+ Token for NSDate end +
+

Syntax

+
public const char DATE_APPLE_END_TOKEN
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

DATE_DATE_FIELD_DELIMITER Field

+
+
+ Token for NSDate date field delimited +
+

Syntax

+
public const char DATE_DATE_FIELD_DELIMITER
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

DATE_GS_DATE_TIME_DELIMITER Field

+
+
+ Token for GSDate date and time delimiter +
+

Syntax

+
public const char DATE_GS_DATE_TIME_DELIMITER
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

DATE_TIME_FIELD_DELIMITER Field

+
+
+ Token for NSDate time field delimiter +
+

Syntax

+
public const char DATE_TIME_FIELD_DELIMITER
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

DICTIONARY_ASSIGN_TOKEN Field

+
+
+ Token of NSDictionary assignment +
+

Syntax

+
public const char DICTIONARY_ASSIGN_TOKEN
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

DICTIONARY_BEGIN_TOKEN Field

+
+
+ Token of NSDictionary start +
+

Syntax

+
public const char DICTIONARY_BEGIN_TOKEN
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

DICTIONARY_END_TOKEN Field

+
+
+ Token of NSDictionary end +
+

Syntax

+
public const char DICTIONARY_END_TOKEN
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

DICTIONARY_ITEM_DELIMITER_TOKEN Field

+
+
+ Token of NSDictionary item delimiter +
+

Syntax

+
public const char DICTIONARY_ITEM_DELIMITER_TOKEN
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

MULTILINE_COMMENT_END_TOKEN Field

+
+
+ End token for multiline comment +
+

Syntax

+
public const char MULTILINE_COMMENT_END_TOKEN
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

MULTILINE_COMMENT_SECOND_TOKEN Field

+
+
+ Second token for multiline comment +
+

Syntax

+
public const char MULTILINE_COMMENT_SECOND_TOKEN
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

Parse Method

+
+
+ Parses the property list from the beginning and returns the root object + of the property list. +
+

Syntax

+
public NSObject Parse ()
+

Returns

+
The root object of the property list. This can either be a NSDictionary or a NSArray.
+

Exceptions

+
+ + + + + + + + + +
TypeReason
+ FormatException + When an error occured during parsing
+
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

Parse Method

+
+
+ Parses an ASCII property list from a byte array. +
+

Syntax

+
public static NSObject Parse (byte[] bytes)
+

Parameters

+
+
+
+ bytes +
+
The ASCII property list data.
+
+
+

Returns

+
The root object of the property list. This is usually a NSDictionary but can also be a NSArray.
+

Exceptions

+
+ + + + + + + + + +
TypeReason
+ FormatException + When an error occurs during parsing.
+
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

Parse Method

+
+
+ Parses an ASCII property list file. +
+

Syntax

+
public static NSObject Parse (System.IO.FileInfo f)
+

Parameters

+
+
+
+ f +
+
The ASCII property list file..
+
+
+

Returns

+
The root object of the property list. This is usually a NSDictionary but can also be a NSArray.
+

Exceptions

+
+ + + + + + + + + + + + + +
TypeReason
+ FormatException + When an error occurs during parsing.
+ System.IO.IOException + When an error occured while reading from the input stream.
+
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

Parse Method

+
+
+ Parses an ASCII property list from an input stream. +
+

Syntax

+
public static NSObject Parse (System.IO.Stream fs)
+

Parameters

+
+
+
+ fs +
+
The input stream that points to the property list's data.
+
+
+

Returns

+
The root object of the property list. This is usually a NSDictionary but can also be a NSArray.
+

Exceptions

+
+ + + + + + + + + + + + + +
TypeReason
+ FormatException + When an error occurs during parsing.
+ System.IO.IOException + +
+
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

ParseQuotedString Method

+
+
+ Parses a string according to the format specified for ASCII property lists. + Such strings can contain escape sequences which are unescaped in this method. +
+

Syntax

+
public static string ParseQuotedString (string s)
+

Parameters

+
+
+
+ s +
+
The escaped string according to the ASCII property list format, without leading and trailing quotation marks.
+
+
+

Returns

+
The unescaped string in UTF-8 or ASCII format, depending on the contained characters.
+

Exceptions

+
+ + + + + + + + + + + + + +
TypeReason
+ ArgumentException + If the en-/decoder for the UTF-8 or ASCII encoding could not be loaded
+ System.Text.EncoderFallbackException + If the string is encoded neither in ASCII nor in UTF-8
+
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

QUOTEDSTRING_BEGIN_TOKEN Field

+
+
+ Token of quoted NSString start +
+

Syntax

+
public const char QUOTEDSTRING_BEGIN_TOKEN
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

QUOTEDSTRING_END_TOKEN Field

+
+
+ Token of quoted NSString end +
+

Syntax

+
public const char QUOTEDSTRING_END_TOKEN
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

QUOTEDSTRING_ESCAPE_TOKEN Field

+
+
+ Token of quoted NSString escaped character +
+

Syntax

+
public const char QUOTEDSTRING_ESCAPE_TOKEN
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

SINGLELINE_COMMENT_SECOND_TOKEN Field

+
+
+ Second token for singleline comment +
+

Syntax

+
public const char SINGLELINE_COMMENT_SECOND_TOKEN
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

WHITESPACE_CARRIAGE_RETURN Field

+
+
+ A carriage return +
+

Syntax

+
public const char WHITESPACE_CARRIAGE_RETURN
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

WHITESPACE_NEWLINE Field

+
+
+ A newline +
+

Syntax

+
public const char WHITESPACE_NEWLINE
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

WHITESPACE_SPACE Field

+
+
+ A space +
+

Syntax

+
public const char WHITESPACE_SPACE
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

WHITESPACE_TAB Field

+
+
+ A tabulator +
+

Syntax

+
public const char WHITESPACE_TAB
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+
+
+
+ + + \ No newline at end of file diff --git a/DiscImageChef.Settings/docs/html/Claunia.PropertyList/BinaryPropertyListParser.html b/DiscImageChef.Settings/docs/html/Claunia.PropertyList/BinaryPropertyListParser.html new file mode 100644 index 00000000..84f6ed54 --- /dev/null +++ b/DiscImageChef.Settings/docs/html/Claunia.PropertyList/BinaryPropertyListParser.html @@ -0,0 +1,753 @@ + + + Claunia.PropertyList.BinaryPropertyListParser + + + + + + + +

BinaryPropertyListParser Class

+

+

+ Parses property lists that are in Apple's binary format. + Use this class when you are sure about the format of the property list. + Otherwise use the PropertyListParser class. +

+

+ Parsing is done by calling the static BinaryPropertyListParser.Parse(Byte[]), + BinaryPropertyListParser.Parse(System.IO.FileInfo) and BinaryPropertyListParser.Parse(System.IO.Stream) methods. +

+

+
+

Syntax

+
public class BinaryPropertyListParser
+
+
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+

Members

+
+

+ See Also: Inherited members from + object. +

+

Protected Constructors

+
+
+ + + + + + +
+
+
+
+ + + Protected constructor so that instantiation is fully controlled by the + static parse methods. +
+
+
+

Public Methods

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
static
+
+ + CopyOfRange + (byte[], int, int) : byte[]
+ Copies a part of a byte array into a new array. +
+
static
+
+ + Parse + (byte[]) : NSObject
+ Parses a binary property list from a byte array. +
+
static
+
+ + Parse + (System.IO.FileInfo) : NSObject
+ Parses a binary property list file. +
+
static
+
+ + Parse + (System.IO.Stream) : NSObject
+ Parses a binary property list from an input stream. +
+
static
+
+ + ParseDouble + (byte[]) : double
+ Parses a double from a (big-endian) byte array. +
+
static
+
+ + ParseDouble + (byte[], int, int) : double
+ Parses a double from a (big-endian) byte array. +
+
static
+
+ + ParseLong + (byte[]) : long
+ Parses a long from a (big-endian) byte array. +
+
static
+
+ + ParseLong + (byte[], int, int) : long
+ Parses a long from a (big-endian) byte array. +
+
static
+
+ + ParseUnsignedInt + (byte[]) : long
+ Parses an unsigned integers from a byte array. +
+
static
+
+ + ParseUnsignedInt + (byte[], int, int) : long
+ Parses an unsigned integer from a byte array. +
+
+
+
+
+
+

Member Details

+
+

BinaryPropertyListParser Constructor

+
+
+ Protected constructor so that instantiation is fully controlled by the + static parse methods. +
+

Syntax

+
protected BinaryPropertyListParser ()
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

CopyOfRange Method

+
+
+ Copies a part of a byte array into a new array. +
+

Syntax

+
public static byte[] CopyOfRange (byte[] src, int startIndex, int endIndex)
+

Parameters

+
+
+
+ src +
+
The source array.
+
+ startIndex +
+
The index from which to start copying.
+
+ endIndex +
+
The index until which to copy.
+
+
+

Returns

+
The copied array.
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

Parse Method

+
+
+ Parses a binary property list from a byte array. +
+

Syntax

+
public static NSObject Parse (byte[] data)
+

Parameters

+
+
+
+ data +
+
The binary property list's data.
+
+
+

Returns

+
The root object of the property list. This is usually a NSDictionary but can also be a NSArray.
+

Exceptions

+
+ + + + + + + + + +
TypeReason
+ Claunia.PropertyList.PropertyListFormatException + When the property list's format could not be parsed.
+
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

Parse Method

+
+
+ Parses a binary property list file. +
+

Syntax

+
public static NSObject Parse (System.IO.FileInfo f)
+

Parameters

+
+
+
+ f +
+
The binary property list file
+
+
+

Returns

+
The root object of the property list. This is usually a NSDictionary but can also be a NSArray.
+

Exceptions

+
+ + + + + + + + + +
TypeReason
+ Claunia.PropertyList.PropertyListFormatException + When the property list's format could not be parsed.
+
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

Parse Method

+
+
+ Parses a binary property list from an input stream. +
+

Syntax

+
public static NSObject Parse (System.IO.Stream fs)
+

Parameters

+
+
+
+ fs +
+
The input stream that points to the property list's data.
+
+
+

Returns

+
The root object of the property list. This is usually a NSDictionary but can also be a NSArray.
+

Exceptions

+
+ + + + + + + + + +
TypeReason
+ Claunia.PropertyList.PropertyListFormatException + When the property list's format could not be parsed.
+
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

ParseDouble Method

+
+
+ Parses a double from a (big-endian) byte array. +
+

Syntax

+
public static double ParseDouble (byte[] bytes)
+

Parameters

+
+
+
+ bytes +
+
The bytes representing the double.
+
+
+

Returns

+
The double represented by the given bytes.
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

ParseDouble Method

+
+
+ Parses a double from a (big-endian) byte array. +
+

Syntax

+
public static double ParseDouble (byte[] bytes, int startIndex, int endIndex)
+

Parameters

+
+
+
+ bytes +
+
The bytes representing the double.
+
+ startIndex +
+
Beginning of the double in the byte array.
+
+ endIndex +
+
End of the double in the byte array.
+
+
+

Returns

+
The double represented by the given bytes.
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

ParseLong Method

+
+
+ Parses a long from a (big-endian) byte array. +
+

Syntax

+
public static long ParseLong (byte[] bytes)
+

Parameters

+
+
+
+ bytes +
+
The bytes representing the long integer.
+
+
+

Returns

+
The long integer represented by the given bytes.
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

ParseLong Method

+
+
+ Parses a long from a (big-endian) byte array. +
+

Syntax

+
public static long ParseLong (byte[] bytes, int startIndex, int endIndex)
+

Parameters

+
+
+
+ bytes +
+
The bytes representing the long integer.
+
+ startIndex +
+
Beginning of the long in the byte array.
+
+ endIndex +
+
End of the long in the byte array.
+
+
+

Returns

+
The long integer represented by the given bytes.
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

ParseUnsignedInt Method

+
+
+ Parses an unsigned integers from a byte array. +
+

Syntax

+
public static long ParseUnsignedInt (byte[] bytes)
+

Parameters

+
+
+
+ bytes +
+
The unsigned integer represented by the given bytes.
+
+
+

Returns

+
The byte array containing the unsigned integer.
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

ParseUnsignedInt Method

+
+
+ Parses an unsigned integer from a byte array. +
+

Syntax

+
public static long ParseUnsignedInt (byte[] bytes, int startIndex, int endIndex)
+

Parameters

+
+
+
+ bytes +
+
The byte array containing the unsigned integer.
+
+ startIndex +
+
Beginning of the unsigned int in the byte array.
+
+ endIndex +
+
End of the unsigned int in the byte array.
+
+
+

Returns

+
The unsigned integer represented by the given bytes.
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+
+
+
+ + + \ No newline at end of file diff --git a/DiscImageChef.Settings/docs/html/Claunia.PropertyList/BinaryPropertyListWriter.html b/DiscImageChef.Settings/docs/html/Claunia.PropertyList/BinaryPropertyListWriter.html new file mode 100644 index 00000000..53e59cb8 --- /dev/null +++ b/DiscImageChef.Settings/docs/html/Claunia.PropertyList/BinaryPropertyListWriter.html @@ -0,0 +1,567 @@ + + + Claunia.PropertyList.BinaryPropertyListWriter + + + + + + + +

BinaryPropertyListWriter Class

+

+

+ A BinaryPropertyListWriter is a helper class for writing out + binary property list files. +

+

+ It contains an output stream and various structures for keeping track + of which NSObjects have already been serialized, and where they were + put in the file. +

+

+
+

Syntax

+
public class BinaryPropertyListWriter
+
+
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+

Members

+
+

+ See Also: Inherited members from + object. +

+

Public Fields

+
+
+ + + + + + + + + + + + + + + + + + + + + +
+
const
+
+ + VERSION_00 + + + + int + (0). + Binary property list version 0.0 +
+
const
+
+ + VERSION_10 + + + + int + (10). + Binary property list version 1.0 +
+
const
+
+ + VERSION_15 + + + + int + (15). + Binary property list version 1.5 +
+
const
+
+ + VERSION_20 + + + + int + (20). + Binary property list version 2.0 +
+
+
+

Public Methods

+
+
+ + + + + + + + + + + + + +
+
static
+
+ + Write + (System.IO.FileInfo, NSObject)
+ Writes a binary plist file with the given object as the root. +
+
static
+
+ + Write + (System.IO.Stream, NSObject)
+ Writes a binary plist serialization of the given object as the root. +
+
static
+
+ + WriteToArray + (NSObject) : byte[]
+ Writes a binary plist serialization of the given object as the root + into a byte array. +
+
+
+
+
+
+

Member Details

+
+

VERSION_00 Field

+
+
+ Binary property list version 0.0 +
+

+ Value: 0

+

Syntax

+
public const int VERSION_00
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

VERSION_10 Field

+
+
+ Binary property list version 1.0 +
+

+ Value: 10

+

Syntax

+
public const int VERSION_10
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

VERSION_15 Field

+
+
+ Binary property list version 1.5 +
+

+ Value: 15

+

Syntax

+
public const int VERSION_15
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

VERSION_20 Field

+
+
+ Binary property list version 2.0 +
+

+ Value: 20

+

Syntax

+
public const int VERSION_20
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

Write Method

+
+
+ Writes a binary plist file with the given object as the root. +
+

Syntax

+
public static void Write (System.IO.FileInfo file, NSObject root)
+

Parameters

+
+
+
+ file +
+
the file to write to
+
+ root +
+
the source of the data to write to the file
+
+
+

Exceptions

+
+ + + + + + + + + +
TypeReason
+ System.IO.IOException + +
+
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

Write Method

+
+
+ Writes a binary plist serialization of the given object as the root. +
+

Syntax

+
public static void Write (System.IO.Stream outStream, NSObject root)
+

Parameters

+
+
+
+ outStream +
+
the stream to write to
+
+ root +
+
the source of the data to write to the stream
+
+
+

Exceptions

+
+ + + + + + + + + +
TypeReason
+ System.IO.IOException + +
+
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

WriteToArray Method

+
+
+ Writes a binary plist serialization of the given object as the root + into a byte array. +
+

Syntax

+
public static byte[] WriteToArray (NSObject root)
+

Parameters

+
+
+
+ root +
+
The root object of the property list
+
+
+

Returns

+
The byte array containing the serialized property list
+

Exceptions

+
+ + + + + + + + + +
TypeReason
+ System.IO.IOException + +
+
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+
+
+
+ + + \ No newline at end of file diff --git a/DiscImageChef.Settings/docs/html/Claunia.PropertyList/NSArray.html b/DiscImageChef.Settings/docs/html/Claunia.PropertyList/NSArray.html new file mode 100644 index 00000000..d835185a --- /dev/null +++ b/DiscImageChef.Settings/docs/html/Claunia.PropertyList/NSArray.html @@ -0,0 +1,960 @@ + + + Claunia.PropertyList.NSArray + + + + + + + +

NSArray Class

+

+ Represents an Array. +

+
+

Syntax

+
public class NSArray : NSObject
+
+
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+

Members

+
+

+ See Also: Inherited members from + NSObject. +

+

Public Constructors

+
+
+ + + + + + + + + + + +
+
+
+
+
+ + NSArray + (params NSObject[])
+
+ Creates a array from an existing one +
+
+
+
+
+ + NSArray + (int)
+
+ Creates an empty array of the given length. +
+
+
+

Public Properties

+
+
+ + + + + + +
[read-only]
+ + Count + + + + int + . + Returns the size of the array. +
+
+
+

Public Methods

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+
+ + ContainsObject + (object) : bool
+ Checks whether an object is present in the array or whether it is equal + to any of the objects in the array. +
+
override
+
+ + Equals + (NSObject) : bool
+ Determines whether the specified Claunia.PropertyList.NSObject is equal to the current Claunia.PropertyList.NSArray. +
+
abstract
+
+ + Equals + (NSObject) : bool
+ Determines if the specific NSObject is the same as the NSObject overriding this method. + (Inherited from NSObject.)
+
override
+
+ + Equals + (object) : bool
+ Determines whether the specified object is equal to the current Claunia.PropertyList.NSArray. +
+
+
+
+ + GetArray + () : NSObject[]
+ Returns the array of NSObjects represented by this NSArray. + Any changes to the values of this array will also affect the NSArray. +
+
override
+
+ + GetHashCode + () : int
+ Serves as a hash function for a Claunia.PropertyList.NSArray object. +
+
+
+
+ + IndexOfIdenticalObject + (object) : int
+ Searches for an object in the array. If it is found its index will be + returned. This method only returns the index of an object that is + identical to the given one. Thus objects that might contain the + same value as the given one will not be considered. +
+
+
+
+ + IndexOfObject + (object) : int
+ Searches for an object in the array. If it is found its index will be + returned. This method also returns an index if the object is not the same + as the one stored in the array but has equal contents. +
+
+
+
+ + LastObject + () : NSObject
+ Returns the last object contained in this array. +
+
+
+
+ + ObjectAtIndex + (int) : NSObject
+ Returns the object stored at the given index. +
+
+
+
+ + ObjectsAtIndexes + (params int[]) : NSObject[]
+ Returns a new array containing only the values stored at the given + indices. The values are sorted by their index. +
+
+
+
+ + Remove + (int)
+ Remove the i-th element from the array. + The array will be resized. +
+
+
+
+ + SetValue + (int, object)
+ Stores an object at the specified index. + If there was another object stored at that index it will be replaced. +
+
+
+
+ + ToASCIIPropertyList + () : string

+ Generates a valid ASCII property list which has this NSArray as its + root object. +

+ The generated property list complies with the format as + described in https://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/PropertyLists/OldStylePlists/OldStylePLists.html + Property List Programming Guide - Old-Style ASCII Property Lists. +

+
+
+
+ + ToGnuStepASCIIPropertyList + () : string

+ Generates a valid ASCII property list in GnuStep format which has this + NSArray as its root object. +

+ The generated property list complies with + the format as described in http://www.gnustep.org/resources/documentation/Developer/Base/Reference/NSPropertyList.html + GnuStep - NSPropertyListSerialization class documentation. +

+
+
+
+ + ToObject + () : object
+ Converts this NSObject into an equivalent object + of the .NET Runtime Environment. +

Claunia.PropertyList.NSArray objects are converted to arrays.

Claunia.PropertyList.NSDictionary objects are converted to objects extending the Dictionary`2 class.

Claunia.PropertyList.NSSet objects are converted to objects extending the List`1 class.

Claunia.PropertyList.NSNumber objects are converted to primitive number values (int, long, double or bool).

Claunia.PropertyList.NSString objects are converted to string objects.

Claunia.PropertyList.NSData objects are converted to byte arrays.

Claunia.PropertyList.NSDate objects are converted to DateTime objects.

Claunia.PropertyList.UID objects are converted to byte arrays.

(Inherited from NSObject.)
+
+
+
+ + ToXmlPropertyList + () : string
+ Generates a valid XML property list including headers using this object as root. + (Inherited from NSObject.)
+
+
+
+
+
+

Member Details

+
+

NSArray Constructor

+
+
+ Creates a array from an existing one +
+

Syntax

+
public NSArray (params NSObject[] a)
+

Parameters

+
+
+
+ a +
+
The array which should be wrapped by the NSArray.
+
+
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

NSArray Constructor

+
+
+ Creates an empty array of the given length. +
+

Syntax

+
public NSArray (int length)
+

Parameters

+
+
+
+ length +
+
The number of elements this array will be able to hold.
+
+
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

ContainsObject Method

+
+
+ Checks whether an object is present in the array or whether it is equal + to any of the objects in the array. +
+

Syntax

+
public bool ContainsObject (object obj)
+

Parameters

+
+
+
+ obj +
+
The object to look for.
+
+
+

Returns

+
+ true, when the object could be found. false otherwise.
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

Count Property

+
+
+ Returns the size of the array. +
+

Syntax

+
public int Count { get; }
+

Value

+
The number of elements that this array can store.
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

Equals Method

+
+
+ Determines whether the specified Claunia.PropertyList.NSObject is equal to the current Claunia.PropertyList.NSArray. +
+

Syntax

+
public override bool Equals (NSObject obj)
+

Parameters

+
+
+
+ obj +
+
The Claunia.PropertyList.NSObject to compare with the current Claunia.PropertyList.NSArray.
+
+
+

Returns

+
+ true if the specified Claunia.PropertyList.NSObject is equal to the current + Claunia.PropertyList.NSArray; otherwise, false.
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

Equals Method

+
+
+ Determines whether the specified object is equal to the current Claunia.PropertyList.NSArray. +
+

Syntax

+
public override bool Equals (object obj)
+

Parameters

+
+
+
+ obj +
+
The object to compare with the current Claunia.PropertyList.NSArray.
+
+
+

Returns

+
+ true if the specified object is equal to the current + Claunia.PropertyList.NSArray; otherwise, false.
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

GetArray Method

+
+
+ Returns the array of NSObjects represented by this NSArray. + Any changes to the values of this array will also affect the NSArray. +
+

Syntax

+
public NSObject[] GetArray ()
+

Returns

+
The actual array represented by this NSArray.
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

GetHashCode Method

+
+
+ Serves as a hash function for a Claunia.PropertyList.NSArray object. +
+

Syntax

+
public override int GetHashCode ()
+

Returns

+
A hash code for this instance that is suitable for use in hashing algorithms and data structures such as a + hash table.
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

IndexOfIdenticalObject Method

+
+
+ Searches for an object in the array. If it is found its index will be + returned. This method only returns the index of an object that is + identical to the given one. Thus objects that might contain the + same value as the given one will not be considered. +
+

Syntax

+
public int IndexOfIdenticalObject (object obj)
+

Parameters

+
+
+
+ obj +
+
The object to look for.
+
+
+

Returns

+
The index of the object, if it was found. -1 otherwise.
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

IndexOfObject Method

+
+
+ Searches for an object in the array. If it is found its index will be + returned. This method also returns an index if the object is not the same + as the one stored in the array but has equal contents. +
+

Syntax

+
public int IndexOfObject (object obj)
+

Parameters

+
+
+
+ obj +
+
The object to look for.
+
+
+

Returns

+
The index of the object, if it was found. -1 otherwise.
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

LastObject Method

+
+
+ Returns the last object contained in this array. +
+

Syntax

+
public NSObject LastObject ()
+

Returns

+
The value of the highest index in the array.
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

ObjectAtIndex Method

+
+
+ Returns the object stored at the given index. +
+

Syntax

+
public NSObject ObjectAtIndex (int i)
+

Parameters

+
+
+
+ i +
+
The index of the object.
+
+
+

Returns

+
The object at the given index.
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

ObjectsAtIndexes Method

+
+
+ Returns a new array containing only the values stored at the given + indices. The values are sorted by their index. +
+

Syntax

+
public NSObject[] ObjectsAtIndexes (params int[] indexes)
+

Parameters

+
+
+
+ indexes +
+
The indices of the objects.
+
+
+

Returns

+
The new array containing the objects stored at the given indices.
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

Remove Method

+
+
+ Remove the i-th element from the array. + The array will be resized. +
+

Syntax

+
public void Remove (int i)
+

Parameters

+
+
+
+ i +
+
The index of the object
+
+
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

SetValue Method

+
+
+ Stores an object at the specified index. + If there was another object stored at that index it will be replaced. +
+

Syntax

+
public void SetValue (int key, object value)
+

Parameters

+
+
+
+ key +
+
The index where to store the object.
+
+ value +
+
The object.
+
+
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

ToASCIIPropertyList Method

+
+
+

+ Generates a valid ASCII property list which has this NSArray as its + root object. +

+

+ The generated property list complies with the format as + described in https://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/PropertyLists/OldStylePlists/OldStylePLists.html + Property List Programming Guide - Old-Style ASCII Property Lists. +

+
+

Syntax

+
public string ToASCIIPropertyList ()
+

Returns

+
ASCII representation of this object.
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

ToGnuStepASCIIPropertyList Method

+
+
+

+ Generates a valid ASCII property list in GnuStep format which has this + NSArray as its root object. +

+

+ The generated property list complies with + the format as described in http://www.gnustep.org/resources/documentation/Developer/Base/Reference/NSPropertyList.html + GnuStep - NSPropertyListSerialization class documentation. +

+
+

Syntax

+
public string ToGnuStepASCIIPropertyList ()
+

Returns

+
GnuStep ASCII representation of this object.
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+
+
+
+ + + \ No newline at end of file diff --git a/DiscImageChef.Settings/docs/html/Claunia.PropertyList/NSData.html b/DiscImageChef.Settings/docs/html/Claunia.PropertyList/NSData.html new file mode 100644 index 00000000..d7635dea --- /dev/null +++ b/DiscImageChef.Settings/docs/html/Claunia.PropertyList/NSData.html @@ -0,0 +1,743 @@ + + + Claunia.PropertyList.NSData + + + + + + + +

NSData Class

+

+ NSData objects are wrappers for byte buffers +

+
+

Syntax

+
public class NSData : NSObject
+
+
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+

Members

+
+

+ See Also: Inherited members from + NSObject. +

+

Public Constructors

+
+
+ + + + + + + + + + + + + + + + +
+
+
+
+
+ + NSData + (byte[])
+
+ Creates the NSData object from the binary representation of it. +
+
+
+
+ + + Creates a NSData object from a file. Using the files contents as the contents of this NSData object. +
+
+
+
+
+ + NSData + (string)
+
+ Creates a NSData object from its textual representation, which is a Base64 encoded amount of bytes. +
+
+
+

Public Properties

+
+
+ + + + + + + + + + + +
[read-only]
+ + Bytes + + + + byte[]. + The bytes contained in this NSData object. +
[read-only]
+ + Length + + + + int + . + Gets the amount of data stored in this object. +
+
+
+

Public Methods

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
override
+
+ + Equals + (NSObject) : bool
+ Determines whether the specified Claunia.PropertyList.NSObject is equal to the current Claunia.PropertyList.NSData. +
+
abstract
+
+ + Equals + (NSObject) : bool
+ Determines if the specific NSObject is the same as the NSObject overriding this method. + (Inherited from NSObject.)
+
override
+
+ + Equals + (object) : bool
+ Determines whether the specified object is equal to the current Claunia.PropertyList.NSData. +
+
+
+
+ + GetBase64EncodedData + () : string
+ Gets the Base64 encoded data contained in this NSData object. +
+
+
+
+ + GetBytes + (System.IO.MemoryStream, int)
+ Loads the bytes from this NSData object into a byte buffer. +
+
+
+
+ + GetBytes + (System.IO.MemoryStream, int, int)
+ Loads the bytes from this NSData object into a byte buffer. +
+
override
+
+ + GetHashCode + () : int
+ Serves as a hash function for a Claunia.PropertyList.NSData object. +
+
+
+
+ + ToObject + () : object
+ Converts this NSObject into an equivalent object + of the .NET Runtime Environment. +

Claunia.PropertyList.NSArray objects are converted to arrays.

Claunia.PropertyList.NSDictionary objects are converted to objects extending the Dictionary`2 class.

Claunia.PropertyList.NSSet objects are converted to objects extending the List`1 class.

Claunia.PropertyList.NSNumber objects are converted to primitive number values (int, long, double or bool).

Claunia.PropertyList.NSString objects are converted to string objects.

Claunia.PropertyList.NSData objects are converted to byte arrays.

Claunia.PropertyList.NSDate objects are converted to DateTime objects.

Claunia.PropertyList.UID objects are converted to byte arrays.

(Inherited from NSObject.)
+
+
+
+ + ToXmlPropertyList + () : string
+ Generates a valid XML property list including headers using this object as root. + (Inherited from NSObject.)
+
+
+
+
+
+

Member Details

+
+

NSData Constructor

+
+
+ Creates the NSData object from the binary representation of it. +
+

Syntax

+
public NSData (byte[] bytes)
+

Parameters

+
+
+
+ bytes +
+
The raw data contained in the NSData object.
+
+
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

NSData Constructor

+
+
+ Creates a NSData object from a file. Using the files contents as the contents of this NSData object. +
+

Syntax

+
public NSData (System.IO.FileInfo file)
+

Parameters

+
+
+
+ file +
+
The file containing the data.
+
+
+

Exceptions

+
+ + + + + + + + + + + + + +
TypeReason
+ System.IO.FileNotFoundException + If the file could not be found.
+ System.IO.IOException + If the file could not be read.
+
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

NSData Constructor

+
+
+ Creates a NSData object from its textual representation, which is a Base64 encoded amount of bytes. +
+

Syntax

+
public NSData (string base64)
+

Parameters

+
+
+
+ base64 +
+
The Base64 encoded contents of the NSData object.
+
+
+

Exceptions

+
+ + + + + + + + + +
TypeReason
+ FormatException + When the given string is not a proper Base64 formatted string.
+
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

Bytes Property

+
+
+ The bytes contained in this NSData object. +
+

Syntax

+
public byte[] Bytes { get; }
+

Value

+
The data as bytes
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

Equals Method

+
+
+ Determines whether the specified Claunia.PropertyList.NSObject is equal to the current Claunia.PropertyList.NSData. +
+

Syntax

+
public override bool Equals (NSObject obj)
+

Parameters

+
+
+
+ obj +
+
The Claunia.PropertyList.NSObject to compare with the current Claunia.PropertyList.NSData.
+
+
+

Returns

+
+ true if the specified Claunia.PropertyList.NSObject is equal to the current + Claunia.PropertyList.NSData; otherwise, false.
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

Equals Method

+
+
+ Determines whether the specified object is equal to the current Claunia.PropertyList.NSData. +
+

Syntax

+
public override bool Equals (object obj)
+

Parameters

+
+
+
+ obj +
+
The object to compare with the current Claunia.PropertyList.NSData.
+
+
+

Returns

+
+ true if the specified object is equal to the current + Claunia.PropertyList.NSData; otherwise, false.
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

GetBase64EncodedData Method

+
+
+ Gets the Base64 encoded data contained in this NSData object. +
+

Syntax

+
public string GetBase64EncodedData ()
+

Returns

+
The Base64 encoded data as a string.
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

GetBytes Method

+
+
+ Loads the bytes from this NSData object into a byte buffer. +
+

Syntax

+
public void GetBytes (System.IO.MemoryStream buf, int length)
+

Parameters

+
+
+
+ buf +
+
The byte buffer which will contain the data
+
+ length +
+
The amount of data to copy
+
+
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

GetBytes Method

+
+
+ Loads the bytes from this NSData object into a byte buffer. +
+

Syntax

+
public void GetBytes (System.IO.MemoryStream buf, int rangeStart, int rangeStop)
+

Parameters

+
+
+
+ buf +
+
The byte buffer which will contain the data
+
+ rangeStart +
+
The start index.
+
+ rangeStop +
+
The stop index.
+
+
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

GetHashCode Method

+
+
+ Serves as a hash function for a Claunia.PropertyList.NSData object. +
+

Syntax

+
public override int GetHashCode ()
+

Returns

+
A hash code for this instance that is suitable for use in hashing algorithms and data structures such as a + hash table.
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

Length Property

+
+
+ Gets the amount of data stored in this object. +
+

Syntax

+
public int Length { get; }
+

Value

+
The number of bytes contained in this object.
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+
+
+
+ + + \ No newline at end of file diff --git a/DiscImageChef.Settings/docs/html/Claunia.PropertyList/NSDate.html b/DiscImageChef.Settings/docs/html/Claunia.PropertyList/NSDate.html new file mode 100644 index 00000000..8cd5201a --- /dev/null +++ b/DiscImageChef.Settings/docs/html/Claunia.PropertyList/NSDate.html @@ -0,0 +1,604 @@ + + + Claunia.PropertyList.NSDate + + + + + + + +

NSDate Class

+

+ Represents a date +

+
+

Syntax

+
public class NSDate : NSObject
+
+
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+

Members

+
+

+ See Also: Inherited members from + NSObject. +

+

Public Constructors

+
+
+ + + + + + + + + + + + + + + + +
+
+
+
+
+ + NSDate + (byte[])
+
+ Creates a date from its binary representation. +
+
+
+
+
+ + NSDate + (DateTime)
+
+ Creates a NSDate from a .NET DateTime +
+
+
+
+
+ + NSDate + (string)
+
+ Parses a date from its textual representation. + That representation has the following pattern:
Example
yyyy-MM-dd'T'HH:mm:ss'Z'
+
+
+

Public Properties

+
+
+ + + + + + +
[read-only]
+ + Date + + + + DateTime + . + Gets the date. +
+
+
+

Public Methods

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
override
+
+ + Equals + (NSObject) : bool
+ Determines whether the specified Claunia.PropertyList.NSObject is equal to the current Claunia.PropertyList.NSDate. +
+
abstract
+
+ + Equals + (NSObject) : bool
+ Determines if the specific NSObject is the same as the NSObject overriding this method. + (Inherited from NSObject.)
+
override
+
+ + Equals + (object) : bool
+ Determines whether the specified object is equal to the current Claunia.PropertyList.NSDate. +
+
override
+
+ + GetHashCode + () : int
+ Serves as a hash function for a Claunia.PropertyList.NSDate object. +
+
+
+
+ + ToObject + () : object
+ Converts this NSObject into an equivalent object + of the .NET Runtime Environment. +

Claunia.PropertyList.NSArray objects are converted to arrays.

Claunia.PropertyList.NSDictionary objects are converted to objects extending the Dictionary`2 class.

Claunia.PropertyList.NSSet objects are converted to objects extending the List`1 class.

Claunia.PropertyList.NSNumber objects are converted to primitive number values (int, long, double or bool).

Claunia.PropertyList.NSString objects are converted to string objects.

Claunia.PropertyList.NSData objects are converted to byte arrays.

Claunia.PropertyList.NSDate objects are converted to DateTime objects.

Claunia.PropertyList.UID objects are converted to byte arrays.

(Inherited from NSObject.)
+
override
+
+ + ToString + () : string
+ Generates a string representation of the date. +
+
+
+
+ + ToXmlPropertyList + () : string
+ Generates a valid XML property list including headers using this object as root. + (Inherited from NSObject.)
+
+
+
+
+
+

Member Details

+
+

NSDate Constructor

+
+
+ Creates a date from its binary representation. +
+

Syntax

+
public NSDate (byte[] bytes)
+

Parameters

+
+
+
+ bytes +
+
bytes The date bytes
+
+
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

NSDate Constructor

+
+
+ Creates a NSDate from a .NET DateTime +
+

Syntax

+
public NSDate (DateTime d)
+

Parameters

+
+
+
+ d +
+
The date
+
+
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

NSDate Constructor

+
+
+ Parses a date from its textual representation. + That representation has the following pattern:
Example
yyyy-MM-dd'T'HH:mm:ss'Z'
+

Syntax

+
public NSDate (string textRepresentation)
+

Parameters

+
+
+
+ textRepresentation +
+
The textual representation of the date (ISO 8601 format)
+
+
+

Exceptions

+
+ + + + + + + + + +
TypeReason
+ FormatException + When the date could not be parsed, i.e. it does not match the expected pattern.
+
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

Date Property

+
+
+ Gets the date. +
+

Syntax

+
public DateTime Date { get; }
+

Value

+
The date.
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

Equals Method

+
+
+ Determines whether the specified Claunia.PropertyList.NSObject is equal to the current Claunia.PropertyList.NSDate. +
+

Syntax

+
public override bool Equals (NSObject obj)
+

Parameters

+
+
+
+ obj +
+
The Claunia.PropertyList.NSObject to compare with the current Claunia.PropertyList.NSDate.
+
+
+

Returns

+
+ true if the specified Claunia.PropertyList.NSObject is equal to the current + Claunia.PropertyList.NSDate; otherwise, false.
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

Equals Method

+
+
+ Determines whether the specified object is equal to the current Claunia.PropertyList.NSDate. +
+

Syntax

+
public override bool Equals (object obj)
+

Parameters

+
+
+
+ obj +
+
The object to compare with the current Claunia.PropertyList.NSDate.
+
+
+

Returns

+
+ true if the specified object is equal to the current + Claunia.PropertyList.NSDate; otherwise, false.
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

GetHashCode Method

+
+
+ Serves as a hash function for a Claunia.PropertyList.NSDate object. +
+

Syntax

+
public override int GetHashCode ()
+

Returns

+
A hash code for this instance that is suitable for use in hashing algorithms and data structures such as a + hash table.
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

ToString Method

+
+
+ Generates a string representation of the date. +
+

Syntax

+
public override string ToString ()
+

Returns

+
A string representation of the date.
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+
+
+
+ + + \ No newline at end of file diff --git a/DiscImageChef.Settings/docs/html/Claunia.PropertyList/NSDictionary.html b/DiscImageChef.Settings/docs/html/Claunia.PropertyList/NSDictionary.html new file mode 100644 index 00000000..8ff08f4d --- /dev/null +++ b/DiscImageChef.Settings/docs/html/Claunia.PropertyList/NSDictionary.html @@ -0,0 +1,1790 @@ + + + Claunia.PropertyList.NSDictionary + + + + + + + +

NSDictionary Class

+

+

+ A NSDictionary is a collection of keys and values, essentially a Dictionary. + The keys are simple Strings whereas the values can be any kind of NSObject. +

+

+ You can access the keys through the function NSDictionary.Keys. +

+

+ Access to the objects stored for each key is given through the function + NSDictionary.ObjectForKey(string). +

+

+ +
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+

Members

+
+

+ See Also: Inherited members from + NSObject. +

+

Public Constructors

+
+
+ + + + + + +
+
+
+
+
+ + NSDictionary + ()
+
+ Creates a new empty NSDictionary. +
+
+
+

Public Properties

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
[read-only]
+ + Count + + + + int + . + Gets the count of items in the current instance. +
[read-only]
+ + IsEmpty + + + + bool + . + Gets a value indicating whether this instance is empty. +
[read-only]
+ + IsReadOnly + + + + bool + . + Gets a value indicating whether this instance is read only. +
+
+ default property +
+
+
+
+ + Item + (string) + + NSObject + . + Gets or sets the Claunia.PropertyList.NSObject at the specified index. +
[read-only]
+ + Keys + + + + ICollection<string> + . + Gets an array with all the keys contained in the current instance. +
[read-only]
+ + Values + + + + ICollection<NSObject> + . + Gets an array with all the objects contained in the current instance. +
+
+
+

Public Methods

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+
+ + Add + (KeyValuePair<string, NSObject>)
+ Adds the specified item. +
+
+
+
+ + Add + (string, NSObject)
+ Add the specified key and value. +
+
+
+
+ + Add + (string, bool)
+ Puts a new key-value pair into this dictionary. +
+
+
+
+ + Add + (string, double)
+ Puts a new key-value pair into this dictionary. +
+
+
+
+ + Add + (string, long)
+ Puts a new key-value pair into this dictionary. +
+
+
+
+ + Add + (string, object)
+ Puts a new key-value pair into this dictionary. + If the value is null, no operation will be performed on the dictionary. +
+
+
+
+ + Clear + ()
+ Clears this instance. +
+
+
+
+ + Contains + (KeyValuePair<string, NSObject>) : bool
+ Checks if the current instance contains the specified item. +
+
+
+
+ + ContainsKey + (object) : bool
+ Checks if the specified object key is contained in the current instance. +
+
+
+
+ + ContainsKey + (string) : bool
+ Checks if there is any item contained in the current instance corresponding with the specified key. +
+
+
+
+ + ContainsValue + (NSObject) : bool
+ Checks if there is any item contained in the current instance corresponding with the specified value. +
+
+
+
+ + ContainsValue + (bool) : bool
+ Checks whether a given value is contained in this dictionary. +
+
+
+
+ + ContainsValue + (byte[]) : bool
+ Checks whether a given value is contained in this dictionary. +
+
+
+
+ + ContainsValue + (DateTime) : bool
+ Checks whether a given value is contained in this dictionary. +
+
+
+
+ + ContainsValue + (double) : bool
+ Checks whether a given value is contained in this dictionary. +
+
+
+
+ + ContainsValue + (long) : bool
+ Checks whether a given value is contained in this dictionary. +
+
+
+
+ + ContainsValue + (object) : bool
+ Checks if the current instance contains the object corresponding to the specified key. +
+
+
+
+ + ContainsValue + (string) : bool
+ Checks whether a given value is contained in this dictionary. +
+
+
+
+ + CopyTo + (KeyValuePair<string, NSObject>[], int)
+ Copies the System.Collections.Generic.Dictionary`2.ValueCollection elements to an existing one-dimensional Array, starting at the specified array index. +
+
override
+
+ + Equals + (NSObject) : bool
+ Determines whether the specified Claunia.PropertyList.NSObject is equal to the current Claunia.PropertyList.NSDictionary. +
+
abstract
+
+ + Equals + (NSObject) : bool
+ Determines if the specific NSObject is the same as the NSObject overriding this method. + (Inherited from NSObject.)
+
+
+
+ + Get + (object) : NSObject
+ Gets the Claunia.PropertyList.NSObject corresponding to the specified key from the current instance. +
+
+
+
+ + GetDictionary + () : Dictionary<string, NSObject>
+ Gets the hashmap which stores the keys and values of this dictionary. + Changes to the hashmap's contents are directly reflected in this + dictionary. +
+
+
+
+ + GetEnumerator + () : IEnumerator<KeyValuePair<string, NSObject>>
+ Gets the enumerator. +
+
override
+
+ + GetHashCode + () : int
+ Serves as a hash function for a Claunia.PropertyList.NSDictionary object. +
+
+
+
+ + ObjectForKey + (string) : NSObject
+ Gets the NSObject stored for the given key. +
+
+
+
+ + Remove + (KeyValuePair<string, NSObject>) : bool
+ Removes the specified item. +
+
+
+
+ + Remove + (object) : bool
+ Removes the item corresponding to the specified key from the current instance, if found. +
+
+
+
+ + Remove + (string) : bool
+ Removes the item belonging to the specified key. +
+
+
+
+ + ToASCIIPropertyList + () : string
+ Generates a valid ASCII property list which has this NSDictionary as its + root object. The generated property list complies with the format as + described in https://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/PropertyLists/OldStylePlists/OldStylePLists.html + Property List Programming Guide - Old-Style ASCII Property Lists. +
+
+
+
+ + ToGnuStepASCIIPropertyList + () : string
+ Generates a valid ASCII property list in GnuStep format which has this + NSDictionary as its root object. The generated property list complies with + the format as described in http://www.gnustep.org/resources/documentation/Developer/Base/Reference/NSPropertyList.html + GnuStep - NSPropertyListSerialization class documentation. +
+
+
+
+ + ToObject + () : object
+ Converts this NSObject into an equivalent object + of the .NET Runtime Environment. +

Claunia.PropertyList.NSArray objects are converted to arrays.

Claunia.PropertyList.NSDictionary objects are converted to objects extending the Dictionary`2 class.

Claunia.PropertyList.NSSet objects are converted to objects extending the List`1 class.

Claunia.PropertyList.NSNumber objects are converted to primitive number values (int, long, double or bool).

Claunia.PropertyList.NSString objects are converted to string objects.

Claunia.PropertyList.NSData objects are converted to byte arrays.

Claunia.PropertyList.NSDate objects are converted to DateTime objects.

Claunia.PropertyList.UID objects are converted to byte arrays.

(Inherited from NSObject.)
+
+
+
+ + ToXmlPropertyList + () : string
+ Generates a valid XML property list including headers using this object as root. + (Inherited from NSObject.)
+
+
+
+ + TryGetValue + (string, out NSObject) : bool
+ Tries to get the item corresponding to the specified key +
+
+
+

Explicitly Implemented Interface Members

+
+
+ + + + + + +
+
+
+
+ + IEnumerable.GetEnumerator + + + Documentation for this section has not yet been entered. +
+
+
+
+
+
+

Member Details

+
+

NSDictionary Constructor

+
+
+ Creates a new empty NSDictionary. +
+

Syntax

+
public NSDictionary ()
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

Add Method

+
+
+ Adds the specified item. +
+

Syntax

+ +

Parameters

+
+
+
+ item +
+
Item.
+
+
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

Add Method

+
+
+ Add the specified key and value. +
+

Syntax

+
public void Add (string key, NSObject value)
+

Parameters

+
+
+
+ key +
+
Key.
+
+ value +
+
Value.
+
+
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

Add Method

+
+
+ Puts a new key-value pair into this dictionary. +
+

Syntax

+
public void Add (string key, bool obj)
+

Parameters

+
+
+
+ key +
+
The key.
+
+ obj +
+
The value.
+
+
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

Add Method

+
+
+ Puts a new key-value pair into this dictionary. +
+

Syntax

+
public void Add (string key, double obj)
+

Parameters

+
+
+
+ key +
+
The key.
+
+ obj +
+
The value.
+
+
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

Add Method

+
+
+ Puts a new key-value pair into this dictionary. +
+

Syntax

+
public void Add (string key, long obj)
+

Parameters

+
+
+
+ key +
+
The key.
+
+ obj +
+
The value.
+
+
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

Add Method

+
+
+ Puts a new key-value pair into this dictionary. + If the value is null, no operation will be performed on the dictionary. +
+

Syntax

+
public void Add (string key, object obj)
+

Parameters

+
+
+
+ key +
+
The key.
+
+ obj +
+
The value. Supported object types are numbers, byte-arrays, dates, strings and arrays or sets of those.
+
+
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

Clear Method

+
+
+ Clears this instance. +
+

Syntax

+
public void Clear ()
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

Contains Method

+
+
+ Checks if the current instance contains the specified item. +
+

Syntax

+
public bool Contains (KeyValuePair<string, NSObject> item)
+

Parameters

+
+
+
+ item +
+
Item.
+
+
+

Returns

+
+ true if it is found, false otherwise.
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

ContainsKey Method

+
+
+ Checks if the specified object key is contained in the current instance. +
+

Syntax

+
public bool ContainsKey (object key)
+

Parameters

+
+
+
+ key +
+
Key.
+
+
+

Returns

+
+ true, if key is contained, false otherwise.
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

ContainsKey Method

+
+
+ Checks if there is any item contained in the current instance corresponding with the specified key. +
+

Syntax

+
public bool ContainsKey (string key)
+

Parameters

+
+
+
+ key +
+
Key.
+
+
+

Returns

+
+ true, if key was contained, false otherwise.
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

ContainsValue Method

+
+
+ Checks if there is any item contained in the current instance corresponding with the specified value. +
+

Syntax

+
public bool ContainsValue (NSObject value)
+

Parameters

+
+
+
+ value +
+
Key.
+
+
+

Returns

+
+ true, if value is contained, false otherwise.
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

ContainsValue Method

+
+
+ Checks whether a given value is contained in this dictionary. +
+

Syntax

+
public bool ContainsValue (bool val)
+

Parameters

+
+
+
+ val +
+
The value that will be searched for.
+
+
+

Returns

+
Whether the key is contained in this dictionary.
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

ContainsValue Method

+
+
+ Checks whether a given value is contained in this dictionary. +
+

Syntax

+
public bool ContainsValue (byte[] val)
+

Parameters

+
+
+
+ val +
+
The value that will be searched for.
+
+
+

Returns

+
Whether the key is contained in this dictionary.
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

ContainsValue Method

+
+
+ Checks whether a given value is contained in this dictionary. +
+

Syntax

+
public bool ContainsValue (DateTime val)
+

Parameters

+
+
+
+ val +
+
The value that will be searched for.
+
+
+

Returns

+
Whether the key is contained in this dictionary.
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

ContainsValue Method

+
+
+ Checks whether a given value is contained in this dictionary. +
+

Syntax

+
public bool ContainsValue (double val)
+

Parameters

+
+
+
+ val +
+
The value that will be searched for.
+
+
+

Returns

+
Whether the key is contained in this dictionary.
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

ContainsValue Method

+
+
+ Checks whether a given value is contained in this dictionary. +
+

Syntax

+
public bool ContainsValue (long val)
+

Parameters

+
+
+
+ val +
+
The value that will be searched for.
+
+
+

Returns

+
Whether the key is contained in this dictionary.
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

ContainsValue Method

+
+
+ Checks if the current instance contains the object corresponding to the specified key. +
+

Syntax

+
public bool ContainsValue (object value)
+

Parameters

+
+
+
+ value +
+
Object to search up in the current instance.
+
+
+

Returns

+
+ true, if value is contained, false otherwise.
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

ContainsValue Method

+
+
+ Checks whether a given value is contained in this dictionary. +
+

Syntax

+
public bool ContainsValue (string val)
+

Parameters

+
+
+
+ val +
+
The value that will be searched for.
+
+
+

Returns

+
Whether the key is contained in this dictionary.
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

CopyTo Method

+
+
+ Copies the System.Collections.Generic.Dictionary`2.ValueCollection elements to an existing one-dimensional Array, starting at the specified array index. +
+

Syntax

+
public void CopyTo (KeyValuePair<string, NSObject>[] array, int arrayIndex)
+

Parameters

+
+
+
+ array +
+
The one-dimensional Array that is the destination of the elements copied from System.Collections.Generic.Dictionary`2.ValueCollection. The Array must have zero-based indexing.
+
+ arrayIndex +
+
The zero-based index in array at which copying begins.
+
+
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

Count Property

+
+
+ Gets the count of items in the current instance. +
+

Syntax

+
public int Count { get; }
+

Value

+
How many items are contained in the current instance.
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

Equals Method

+
+
+ Determines whether the specified Claunia.PropertyList.NSObject is equal to the current Claunia.PropertyList.NSDictionary. +
+

Syntax

+
public override bool Equals (NSObject obj)
+

Parameters

+
+
+
+ obj +
+
The Claunia.PropertyList.NSObject to compare with the current Claunia.PropertyList.NSDictionary.
+
+
+

Returns

+
+ true if the specified Claunia.PropertyList.NSObject is equal to the current + Claunia.PropertyList.NSDictionary; otherwise, false.
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

Get Method

+
+
+ Gets the Claunia.PropertyList.NSObject corresponding to the specified key from the current instance. +
+

Syntax

+
public NSObject Get (object key)
+

Parameters

+
+
+
+ key +
+
Key.
+
+
+

Returns

+
The object corresponding to the specified key, null if not found in the current instance.
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

GetDictionary Method

+
+
+ Gets the hashmap which stores the keys and values of this dictionary. + Changes to the hashmap's contents are directly reflected in this + dictionary. +
+

Syntax

+
public Dictionary<string, NSObject> GetDictionary ()
+

Returns

+
The hashmap which is used by this dictionary to store its contents.
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

GetEnumerator Method

+
+
+ Gets the enumerator. +
+

Syntax

+ +

Returns

+
The enumerator.
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

GetHashCode Method

+
+
+ Serves as a hash function for a Claunia.PropertyList.NSDictionary object. +
+

Syntax

+
public override int GetHashCode ()
+

Returns

+
A hash code for this instance that is suitable for use in hashing algorithms and data structures such as a + hash table.
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

IsEmpty Property

+
+
+ Gets a value indicating whether this instance is empty. +
+

Syntax

+
public bool IsEmpty { get; }
+

Value

+
+ true if this instance is empty; otherwise, false.
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

IsReadOnly Property

+
+
+ Gets a value indicating whether this instance is read only. +
+

Syntax

+
public bool IsReadOnly { get; }
+

Value

+
+ true if this instance is read only; otherwise, false.
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

Item Property

+
+
+ Gets or sets the Claunia.PropertyList.NSObject at the specified index. +
+

Syntax

+
+

+ This is the default property for this class. +

public NSObject this [string index] { get; set; }
+

Parameters

+
+
+
+ index +
+
Index.
+
+
+

Value

+
+ Documentation for this section has not yet been entered. +
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

Keys Property

+
+
+ Gets an array with all the keys contained in the current instance. +
+

Syntax

+
public ICollection<string> Keys { get; }
+

Value

+
The keys.
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

ObjectForKey Method

+
+
+ Gets the NSObject stored for the given key. +
+

Syntax

+
public NSObject ObjectForKey (string key)
+

Parameters

+
+
+
+ key +
+
The key.
+
+
+

Returns

+
The object.
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

Remove Method

+
+
+ Removes the specified item. +
+

Syntax

+ +

Parameters

+
+
+
+ item +
+
Item to remove.
+
+
+

Returns

+
+ true if successfully removed, false if not, or if item is not in current instance.
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

Remove Method

+
+
+ Removes the item corresponding to the specified key from the current instance, if found. +
+

Syntax

+
public bool Remove (object key)
+

Parameters

+
+
+
+ key +
+
Key.
+
+
+

Returns

+
+ true, if removed, false otherwise.
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

Remove Method

+
+
+ Removes the item belonging to the specified key. +
+

Syntax

+
public bool Remove (string key)
+

Parameters

+
+
+
+ key +
+
Key.
+
+
+

Returns

+
+ Documentation for this section has not yet been entered. +
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

System.Collections.IEnumerable.GetEnumerator Method

+
+
+ Documentation for this section has not yet been entered. +
+

Syntax

+
+ IEnumerator System.Collections.IEnumerable.GetEnumerator ()
+

Returns

+
+ Documentation for this section has not yet been entered. +
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

ToASCIIPropertyList Method

+
+
+ Generates a valid ASCII property list which has this NSDictionary as its + root object. The generated property list complies with the format as + described in https://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/PropertyLists/OldStylePlists/OldStylePLists.html + Property List Programming Guide - Old-Style ASCII Property Lists. +
+

Syntax

+
public string ToASCIIPropertyList ()
+

Returns

+
ASCII representation of this object.
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

ToGnuStepASCIIPropertyList Method

+
+
+ Generates a valid ASCII property list in GnuStep format which has this + NSDictionary as its root object. The generated property list complies with + the format as described in http://www.gnustep.org/resources/documentation/Developer/Base/Reference/NSPropertyList.html + GnuStep - NSPropertyListSerialization class documentation. +
+

Syntax

+
public string ToGnuStepASCIIPropertyList ()
+

Returns

+
GnuStep ASCII representation of this object.
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

TryGetValue Method

+
+
+ Tries to get the item corresponding to the specified key +
+

Syntax

+
public bool TryGetValue (string key, out NSObject value)
+

Parameters

+
+
+
+ key +
+
Key.
+
+ value +
+
Where to store the value.
+
+
+

Returns

+
+ true, if get value was successfully found and retrieved, false otherwise.
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

Values Property

+
+
+ Gets an array with all the objects contained in the current instance. +
+

Syntax

+
public ICollection<NSObject> Values { get; }
+

Value

+
The objects.
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+
+
+
+ + + \ No newline at end of file diff --git a/DiscImageChef.Settings/docs/html/Claunia.PropertyList/NSNumber.html b/DiscImageChef.Settings/docs/html/Claunia.PropertyList/NSNumber.html new file mode 100644 index 00000000..50cfe6f0 --- /dev/null +++ b/DiscImageChef.Settings/docs/html/Claunia.PropertyList/NSNumber.html @@ -0,0 +1,1139 @@ + + + Claunia.PropertyList.NSNumber + + + + + + + +

NSNumber Class

+

+ A number whose value is either an integer, a real number or bool. +

+
+

Syntax

+
public class NSNumber : NSObject, IComparable
+
+
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+

Members

+
+

+ See Also: Inherited members from + NSObject. +

+

Public Constructors

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+
+
+ + NSNumber + (bool)
+
+ Creates a bool number. +
+
+
+
+
+ + NSNumber + (double)
+
+ Creates a real number. +
+
+
+
+
+ + NSNumber + (int)
+
+ Creates an integer number. +
+
+
+
+
+ + NSNumber + (long)
+
+ Creates an integer number. +
+
+
+
+
+ + NSNumber + (string)
+
+ Creates a number from its textual representation. +
+
+
+
+
+ + NSNumber + (byte[], int)
+
+ Parses integers and real numbers from their binary representation. + Note: real numbers are not yet supported.
+
+
+

Public Fields

+
+
+ + + + + + + + + + + + + + + + +
+
const
+
+ + BOOLEAN + + + + int + (2). + Indicates that the number's value is bool. +
+
const
+
+ + INTEGER + + + + int + (0). + Indicates that the number's value is an integer. + The number is stored as a .NET long. + Its original value could have been char, short, int, long or even long long. +
+
const
+
+ + REAL + + + + int + (1). + Indicates that the number's value is a real number. + The number is stored as a .NET double. + Its original value could have been float or double. +
+
+
+

Public Methods

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+
+ + CompareTo + (object) : int
+ Compares the current Claunia.PropertyList.NSNumber to the specified object. +
+
override
+
+ + Equals + (NSObject) : bool
+ Determines whether the specified Claunia.PropertyList.NSObject is equal to the current Claunia.PropertyList.NSNumber. +
+
abstract
+
+ + Equals + (NSObject) : bool
+ Determines if the specific NSObject is the same as the NSObject overriding this method. + (Inherited from NSObject.)
+
override
+
+ + Equals + (object) : bool
+ Checks whether the other object is a NSNumber of the same value. +
+
+
+
+ + floatValue + () : float
+ The number's float value. + WARNING: Possible loss of precision if the value is outside the float range. +
+
override
+
+ + GetHashCode + () : int
+ Serves as a hash function for a Claunia.PropertyList.NSNumber object. +
+
+
+
+ + GetNSNumberType + () : int
+ Gets the type of this number's value. +
+
+
+
+ + isBoolean + () : bool
+ Checks whether the value of this NSNumber is a bool. +
+
+
+
+ + isInteger + () : bool
+ Checks whether the value of this NSNumber is an integer. +
+
+
+
+ + isReal + () : bool
+ Checks whether the value of this NSNumber is a real number. +
+
+
+
+ + ToBool + () : bool
+ The number's bool value. +
+
+
+
+ + ToDouble + () : double
+ The number's double value. +
+
+
+
+ + ToInt + () : int
+ The number's int value. + Note: Even though the number's type might be INTEGER it can be larger than a Java int. + Use intValue() only if you are certain that it contains a number from the int range. + Otherwise the value might be innaccurate.
+
+
+
+ + ToLong + () : long
+ The number's long value. +
+
+
+
+ + ToObject + () : object
+ Converts this NSObject into an equivalent object + of the .NET Runtime Environment. +

Claunia.PropertyList.NSArray objects are converted to arrays.

Claunia.PropertyList.NSDictionary objects are converted to objects extending the Dictionary`2 class.

Claunia.PropertyList.NSSet objects are converted to objects extending the List`1 class.

Claunia.PropertyList.NSNumber objects are converted to primitive number values (int, long, double or bool).

Claunia.PropertyList.NSString objects are converted to string objects.

Claunia.PropertyList.NSData objects are converted to byte arrays.

Claunia.PropertyList.NSDate objects are converted to DateTime objects.

Claunia.PropertyList.UID objects are converted to byte arrays.

(Inherited from NSObject.)
+
override
+
+ + ToString + () : string
+ Returns a string that represents the current Claunia.PropertyList.NSNumber. +
+
+
+
+ + ToXmlPropertyList + () : string
+ Generates a valid XML property list including headers using this object as root. + (Inherited from NSObject.)
+
+
+
+
+
+

Member Details

+
+

NSNumber Constructor

+
+
+ Creates a bool number. +
+

Syntax

+
public NSNumber (bool b)
+

Parameters

+
+
+
+ b +
+
The bool value.
+
+
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

NSNumber Constructor

+
+
+ Creates a real number. +
+

Syntax

+
public NSNumber (double d)
+

Parameters

+
+
+
+ d +
+
The real value.
+
+
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

NSNumber Constructor

+
+
+ Creates an integer number. +
+

Syntax

+
public NSNumber (int i)
+

Parameters

+
+
+
+ i +
+
The integer value.
+
+
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

NSNumber Constructor

+
+
+ Creates an integer number. +
+

Syntax

+
public NSNumber (long l)
+

Parameters

+
+
+
+ l +
+
The long integer value.
+
+
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

NSNumber Constructor

+
+
+ Creates a number from its textual representation. +
+

Syntax

+
public NSNumber (string text)
+

See Also

+
+ + + +
+

Parameters

+
+
+
+ text +
+
The textual representation of the number.
+
+
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

NSNumber Constructor

+
+
+ Parses integers and real numbers from their binary representation. + Note: real numbers are not yet supported.
+

Syntax

+
public NSNumber (byte[] bytes, int type)
+

See Also

+
+ + +
+

Parameters

+
+
+
+ bytes +
+
The binary representation
+
+ type +
+
The type of number
+
+
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

BOOLEAN Field

+
+
+ Indicates that the number's value is bool. +
+

+ Value: 2

+

Syntax

+
public const int BOOLEAN
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

CompareTo Method

+
+
+ Compares the current Claunia.PropertyList.NSNumber to the specified object. +
+

Syntax

+
public int CompareTo (object o)
+

Parameters

+
+
+
+ o +
+
Object to compare to the current Claunia.PropertyList.NSNumber.
+
+
+

Returns

+
0 if the numbers are equal, 1 if the current Claunia.PropertyList.NSNumber is greater + than the argument and -1 if it is less, or the argument is not a number.
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

Equals Method

+
+
+ Determines whether the specified Claunia.PropertyList.NSObject is equal to the current Claunia.PropertyList.NSNumber. +
+

Syntax

+
public override bool Equals (NSObject obj)
+

Parameters

+
+
+
+ obj +
+
The Claunia.PropertyList.NSObject to compare with the current Claunia.PropertyList.NSNumber.
+
+
+

Returns

+
+ true if the specified Claunia.PropertyList.NSObject is equal to the current + Claunia.PropertyList.NSNumber; otherwise, false.
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

Equals Method

+
+
+ Checks whether the other object is a NSNumber of the same value. +
+

Syntax

+
public override bool Equals (object obj)
+

Parameters

+
+
+
+ obj +
+
The object to compare to.
+
+
+

Returns

+
Whether the objects are equal in terms of numeric value and type.
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

floatValue Method

+
+
+ The number's float value. + WARNING: Possible loss of precision if the value is outside the float range. +
+

Syntax

+
public float floatValue ()
+

Returns

+
The value of the number as float.
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

GetHashCode Method

+
+
+ Serves as a hash function for a Claunia.PropertyList.NSNumber object. +
+

Syntax

+
public override int GetHashCode ()
+

Returns

+
A hash code for this instance that is suitable for use in hashing algorithms and data structures such as a + hash table.
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

GetNSNumberType Method

+
+
+ Gets the type of this number's value. +
+

Syntax

+
public int GetNSNumberType ()
+

See Also

+
+ + + +
+

Returns

+
The type flag.
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

INTEGER Field

+
+
+ Indicates that the number's value is an integer. + The number is stored as a .NET long. + Its original value could have been char, short, int, long or even long long. +
+

+ Value: 0

+

Syntax

+
public const int INTEGER
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

isBoolean Method

+
+
+ Checks whether the value of this NSNumber is a bool. +
+

Syntax

+
public bool isBoolean ()
+

Returns

+
Whether the number's value is a bool.
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

isInteger Method

+
+
+ Checks whether the value of this NSNumber is an integer. +
+

Syntax

+
public bool isInteger ()
+

Returns

+
Whether the number's value is an integer.
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

isReal Method

+
+
+ Checks whether the value of this NSNumber is a real number. +
+

Syntax

+
public bool isReal ()
+

Returns

+
Whether the number's value is a real number.
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

REAL Field

+
+
+ Indicates that the number's value is a real number. + The number is stored as a .NET double. + Its original value could have been float or double. +
+

+ Value: 1

+

Syntax

+
public const int REAL
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

ToBool Method

+
+
+ The number's bool value. +
+

Syntax

+
public bool ToBool ()
+

Returns

+
+ true if the value is true or non-zero, false otherwise.
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

ToDouble Method

+
+
+ The number's double value. +
+

Syntax

+
public double ToDouble ()
+

Returns

+
The value of the number as double.
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

ToInt Method

+
+
+ The number's int value. + Note: Even though the number's type might be INTEGER it can be larger than a Java int. + Use intValue() only if you are certain that it contains a number from the int range. + Otherwise the value might be innaccurate.
+

Syntax

+
public int ToInt ()
+

Returns

+
The value of the number as int.
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

ToLong Method

+
+
+ The number's long value. +
+

Syntax

+
public long ToLong ()
+

Returns

+
The value of the number as long
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

ToString Method

+
+
+ Returns a string that represents the current Claunia.PropertyList.NSNumber. +
+

Syntax

+
public override string ToString ()
+

Returns

+
A string that represents the current Claunia.PropertyList.NSNumber.
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+
+
+
+ + + \ No newline at end of file diff --git a/DiscImageChef.Settings/docs/html/Claunia.PropertyList/NSObject.html b/DiscImageChef.Settings/docs/html/Claunia.PropertyList/NSObject.html new file mode 100644 index 00000000..a382362c --- /dev/null +++ b/DiscImageChef.Settings/docs/html/Claunia.PropertyList/NSObject.html @@ -0,0 +1,830 @@ + + + Claunia.PropertyList.NSObject + + + + + + + +

NSObject Class

+

+

+ Abstract interface for any object contained in a property list. +

+

+ The names and functions of the various objects orient themselves + towards Apple's Cocoa API. +

+

+
+

Syntax

+
public abstract class NSObject
+
+
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+

Members

+
+

+ See Also: Inherited members from + object. +

+

Protected Constructors

+
+
+ + + + + + +
+
+
+
+
+ + NSObject + ()
+
+ Documentation for this section has not yet been entered. +
+
+
+

Public Methods

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
abstract
+
+ + Equals + (NSObject) : bool
+ Determines if the specific NSObject is the same as the NSObject overriding this method. +
+
+
+
+ + ToObject + () : object
+ Converts this NSObject into an equivalent object + of the .NET Runtime Environment. +

Claunia.PropertyList.NSArray objects are converted to arrays.

Claunia.PropertyList.NSDictionary objects are converted to objects extending the Dictionary`2 class.

Claunia.PropertyList.NSSet objects are converted to objects extending the List`1 class.

Claunia.PropertyList.NSNumber objects are converted to primitive number values (int, long, double or bool).

Claunia.PropertyList.NSString objects are converted to string objects.

Claunia.PropertyList.NSData objects are converted to byte arrays.

Claunia.PropertyList.NSDate objects are converted to DateTime objects.

Claunia.PropertyList.UID objects are converted to byte arrays.

+
+
+
+ + ToXmlPropertyList + () : string
+ Generates a valid XML property list including headers using this object as root. +
+
static
+
+ + Wrap + (bool) : NSNumber
+ Wraps the given value inside a NSObject. +
+
static
+
+ + Wrap + (byte[]) : NSData
+ Wraps the given value inside a NSObject. +
+
static
+
+ + Wrap + (Dictionary<string, object>) : NSDictionary
+ Creates a NSDictionary with the contents of the given map. +
+
static
+
+ + Wrap + (List<object>) : NSSet
+ Creates a NSSet with the contents of this set. +
+
static
+
+ + Wrap + (double) : NSNumber
+ Wraps the given value inside a NSObject. +
+
static
+
+ + Wrap + (long) : NSNumber
+ Wraps the given value inside a NSObject. +
+
static
+
+ + Wrap + (object) : NSObject

+ Creates a NSObject representing the given .NET Object. +

+ Numerics of type bool, int, long, short, byte, float or double are wrapped as NSNumber objects. +

+ Strings are wrapped as Claunia.PropertyList.NSString objects and byte arrays as Claunia.PropertyList.NSData objects. +

+ DateTime objects are wrapped as Claunia.PropertyList.NSDate objects. +

+ Serializable classes are serialized and their data is stored in Claunia.PropertyList.NSData objects. +

+ Arrays and Collection objects are converted to Claunia.PropertyList.NSArray where each array member is wrapped into a Claunia.PropertyList.NSObject. +

+ Dictionaries are converted to Claunia.PropertyList.NSDictionary. Each key is converted to a string and each value wrapped into a Claunia.PropertyList.NSObject. +

+
static
+
+ + Wrap + (object[]) : NSArray
+ Creates a NSArray with the contents of the given array. +
+
static
+
+ + WrapSerialized + (object) : NSData
+ Serializes the given object using Java's default object serialization + and wraps the serialized object in a NSData object. +
+
+
+
+
+
+

Member Details

+
+

NSObject Constructor

+
+
+ Documentation for this section has not yet been entered. +
+

Syntax

+
protected NSObject ()
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

Equals Method

+
+
+ Determines if the specific NSObject is the same as the NSObject overriding this method. +
+

Syntax

+
public abstract bool Equals (NSObject obj)
+

Parameters

+
+
+
+ obj +
+
The Claunia.PropertyList.NSObject to compare with the current Claunia.PropertyList.NSObject.
+
+
+

Returns

+
+ true if the specified Claunia.PropertyList.NSObject is equal to the current + Claunia.PropertyList.NSObject; otherwise, false.
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

ToObject Method

+
+
+ Converts this NSObject into an equivalent object + of the .NET Runtime Environment. +

Claunia.PropertyList.NSArray objects are converted to arrays.

Claunia.PropertyList.NSDictionary objects are converted to objects extending the Dictionary`2 class.

Claunia.PropertyList.NSSet objects are converted to objects extending the List`1 class.

Claunia.PropertyList.NSNumber objects are converted to primitive number values (int, long, double or bool).

Claunia.PropertyList.NSString objects are converted to string objects.

Claunia.PropertyList.NSData objects are converted to byte arrays.

Claunia.PropertyList.NSDate objects are converted to DateTime objects.

Claunia.PropertyList.UID objects are converted to byte arrays.

+

Syntax

+
public object ToObject ()
+

Returns

+
A native .NET object representing this NSObject's value.
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

ToXmlPropertyList Method

+
+
+ Generates a valid XML property list including headers using this object as root. +
+

Syntax

+
public string ToXmlPropertyList ()
+

Returns

+
The XML representation of the property list including XML header and doctype information.
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

Wrap Method

+
+
+ Wraps the given value inside a NSObject. +
+

Syntax

+
public static NSNumber Wrap (bool value)
+

Parameters

+
+
+
+ value +
+
The value to represent as a NSObject.
+
+
+

Returns

+
A NSObject representing the given value.
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

Wrap Method

+
+
+ Wraps the given value inside a NSObject. +
+

Syntax

+
public static NSData Wrap (byte[] value)
+

Parameters

+
+
+
+ value +
+
The value to represent as a NSObject.
+
+
+

Returns

+
A NSObject representing the given value.
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

Wrap Method

+
+
+ Creates a NSDictionary with the contents of the given map. +
+

Syntax

+
public static NSDictionary Wrap (Dictionary<string, object> value)
+

Parameters

+
+
+
+ value +
+
The value to represent as a NSObject.
+
+
+

Returns

+
A NSObject representing the given value.
+

Exceptions

+
+ + + + + + + + + +
TypeReason
+ SystemException + When one of the values contained in the map cannot be represented by a NSObject.
+
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

Wrap Method

+
+
+ Creates a NSSet with the contents of this set. +
+

Syntax

+
public static NSSet Wrap (List<object> value)
+

Parameters

+
+
+
+ value +
+
The value to represent as a NSObject.
+
+
+

Returns

+
A NSObject representing the given value.
+

Exceptions

+
+ + + + + + + + + +
TypeReason
+ SystemException + When one of the values contained in the map cannot be represented by a NSObject.
+
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

Wrap Method

+
+
+ Wraps the given value inside a NSObject. +
+

Syntax

+
public static NSNumber Wrap (double value)
+

Parameters

+
+
+
+ value +
+
The value to represent as a NSObject.
+
+
+

Returns

+
A NSObject representing the given value.
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

Wrap Method

+
+
+ Wraps the given value inside a NSObject. +
+

Syntax

+
public static NSNumber Wrap (long value)
+

Parameters

+
+
+
+ value +
+
The value to represent as a NSObject.
+
+
+

Returns

+
A NSObject representing the given value.
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

Wrap Method

+
+
+

+ Creates a NSObject representing the given .NET Object. +

+

+ Numerics of type bool, int, long, short, byte, float or double are wrapped as NSNumber objects. +

+

+ Strings are wrapped as Claunia.PropertyList.NSString objects and byte arrays as Claunia.PropertyList.NSData objects. +

+

+ DateTime objects are wrapped as Claunia.PropertyList.NSDate objects. +

+

+ Serializable classes are serialized and their data is stored in Claunia.PropertyList.NSData objects. +

+

+ Arrays and Collection objects are converted to Claunia.PropertyList.NSArray where each array member is wrapped into a Claunia.PropertyList.NSObject. +

+

+ Dictionaries are converted to Claunia.PropertyList.NSDictionary. Each key is converted to a string and each value wrapped into a Claunia.PropertyList.NSObject. +

+
+

Syntax

+
public static NSObject Wrap (object o)
+

Parameters

+
+
+
+ o +
+
The object to represent.
+
+
+

Returns

+
A NSObject equivalent to the given object.
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

Wrap Method

+
+
+ Creates a NSArray with the contents of the given array. +
+

Syntax

+
public static NSArray Wrap (object[] value)
+

Parameters

+
+
+
+ value +
+
The value to represent as a NSObject.
+
+
+

Returns

+
A NSObject representing the given value.
+

Exceptions

+
+ + + + + + + + + +
TypeReason
+ SystemException + When one of the objects contained in the array cannot be represented by a NSObject.
+
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

WrapSerialized Method

+
+
+ Serializes the given object using Java's default object serialization + and wraps the serialized object in a NSData object. +
+

Syntax

+
public static NSData WrapSerialized (object o)
+

Parameters

+
+
+
+ o +
+
The object to serialize and wrap.
+
+
+

Returns

+
A NSData object
+

Exceptions

+
+ + + + + + + + + +
TypeReason
+ SystemException + When the object could not be serialized.
+
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+
+
+
+ + + \ No newline at end of file diff --git a/DiscImageChef.Settings/docs/html/Claunia.PropertyList/NSSet.html b/DiscImageChef.Settings/docs/html/Claunia.PropertyList/NSSet.html new file mode 100644 index 00000000..c321492c --- /dev/null +++ b/DiscImageChef.Settings/docs/html/Claunia.PropertyList/NSSet.html @@ -0,0 +1,932 @@ + + + Claunia.PropertyList.NSSet + + + + + + + +

NSSet Class

+

+

+ A set is an interface to an unordered collection of objects. +

+

+ This implementation uses a List`1as the underlying + data structure. +

+

+
+

Syntax

+
public class NSSet : NSObject, IEnumerable
+
+
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+

Members

+
+

+ See Also: Inherited members from + NSObject. +

+

Public Constructors

+
+
+ + + + + + + + + + + + + + + + + + + + + +
+
+
+
+
+ + NSSet + ()
+
+ Creates an empty unordered set. +
+
+
+
+
+ + NSSet + (params NSObject[])
+
+ Creates a set and fill it with the given objects. +
+
+
+
+
+ + NSSet + (bool)
+
+ Creates an empty set. +
+
+
+
+
+ + NSSet + (bool, params NSObject[])
+
+ Creates a set and fill it with the given objects. +
+
+
+

Public Properties

+
+
+ + + + + + +
[read-only]
+ + Count + + + + int + . + Gets the number of elements in the set. +
+
+
+

Public Methods

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+
+ + AddObject + (NSObject)
+ Adds an object to the set. +
+
+
+
+ + AllObjects + () : NSObject[]
+ Returns all objects contained in the set. +
+
+
+
+ + AnyObject + () : NSObject
+ Returns one of the objects in the set, or null + if the set contains no objects. +
+
+
+
+ + ContainsObject + (NSObject) : bool
+ Finds out whether a given object is contained in the set. +
+
override
+
+ + Equals + (NSObject) : bool
+ Determines whether the specified Claunia.PropertyList.NSObject is equal to the current Claunia.PropertyList.NSSet. +
+
abstract
+
+ + Equals + (NSObject) : bool
+ Determines if the specific NSObject is the same as the NSObject overriding this method. + (Inherited from NSObject.)
+
override
+
+ + Equals + (object) : bool
+ Determines whether the specified object is equal to the current Claunia.PropertyList.NSSet. +
+
+
+
+ + GetEnumerator + () : IEnumerator
+ Returns an enumerator object that lets you iterate over all elements of the set. + This is the equivalent to objectEnumerator in the Cocoa implementation + of NSSet. +
+
override
+
+ + GetHashCode + () : int
+ Serves as a hash function for a Claunia.PropertyList.NSSet object. +
+
+
+
+ + IntersectsSet + (NSSet) : bool
+ Finds out whether at least one object is present in both sets. +
+
+
+
+ + IsSubsetOfSet + (NSSet) : bool
+ Finds out if this set is a subset of the given set. +
+
+
+
+ + Member + (NSObject) : NSObject
+ Determines whether the set contains an object equal to a given object + and returns that object if it is present. +
+
+
+
+ + RemoveObject + (NSObject)
+ Removes an object from the set. +
+
+
+
+ + ToObject + () : object
+ Converts this NSObject into an equivalent object + of the .NET Runtime Environment. +

Claunia.PropertyList.NSArray objects are converted to arrays.

Claunia.PropertyList.NSDictionary objects are converted to objects extending the Dictionary`2 class.

Claunia.PropertyList.NSSet objects are converted to objects extending the List`1 class.

Claunia.PropertyList.NSNumber objects are converted to primitive number values (int, long, double or bool).

Claunia.PropertyList.NSString objects are converted to string objects.

Claunia.PropertyList.NSData objects are converted to byte arrays.

Claunia.PropertyList.NSDate objects are converted to DateTime objects.

Claunia.PropertyList.UID objects are converted to byte arrays.

(Inherited from NSObject.)
+
+
+
+ + ToXmlPropertyList + () : string
+ Generates a valid XML property list including headers using this object as root. + (Inherited from NSObject.)
+
+
+
+
+
+

Member Details

+
+

NSSet Constructor

+
+
+ Creates an empty unordered set. +
+

Syntax

+
public NSSet ()
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

NSSet Constructor

+
+
+ Creates a set and fill it with the given objects. +
+

Syntax

+
public NSSet (params NSObject[] objects)
+

Parameters

+
+
+
+ objects +
+
The objects to populate the set.
+
+
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

NSSet Constructor

+
+
+ Creates an empty set. +
+

Syntax

+
public NSSet (bool ordered)
+

Parameters

+
+
+
+ ordered +
+
Should the set be ordered on operations?
+
+
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

NSSet Constructor

+
+
+ Creates a set and fill it with the given objects. +
+

Syntax

+
public NSSet (bool ordered, params NSObject[] objects)
+

Parameters

+
+
+
+ ordered +
+
Should the set be ordered on operations?
+
+ objects +
+
The objects to populate the set.
+
+
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

AddObject Method

+
+
+ Adds an object to the set. +
+

Syntax

+
public void AddObject (NSObject obj)
+

Parameters

+
+
+
+ obj +
+
The object to add.
+
+
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

AllObjects Method

+
+
+ Returns all objects contained in the set. +
+

Syntax

+
public NSObject[] AllObjects ()
+

Returns

+
An array of all objects in the set.
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

AnyObject Method

+
+
+ Returns one of the objects in the set, or null + if the set contains no objects. +
+

Syntax

+
public NSObject AnyObject ()
+

Returns

+
The first object in the set, or null if the set is empty.
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

ContainsObject Method

+
+
+ Finds out whether a given object is contained in the set. +
+

Syntax

+
public bool ContainsObject (NSObject obj)
+

Parameters

+
+
+
+ obj +
+
The object to look for.
+
+
+

Returns

+
+ true, when the object was found, false otherwise.
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

Count Property

+
+
+ Gets the number of elements in the set. +
+

Syntax

+
public int Count { get; }
+

Value

+
The number of elements in the set.
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

Equals Method

+
+
+ Determines whether the specified Claunia.PropertyList.NSObject is equal to the current Claunia.PropertyList.NSSet. +
+

Syntax

+
public override bool Equals (NSObject obj)
+

Parameters

+
+
+
+ obj +
+
The Claunia.PropertyList.NSObject to compare with the current Claunia.PropertyList.NSSet.
+
+
+

Returns

+
+ true if the specified Claunia.PropertyList.NSObject is equal to the current + Claunia.PropertyList.NSSet; otherwise, false.
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

Equals Method

+
+
+ Determines whether the specified object is equal to the current Claunia.PropertyList.NSSet. +
+

Syntax

+
public override bool Equals (object obj)
+

Parameters

+
+
+
+ obj +
+
The object to compare with the current Claunia.PropertyList.NSSet.
+
+
+

Returns

+
+ true if the specified object is equal to the current + Claunia.PropertyList.NSSet; otherwise, false.
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

GetEnumerator Method

+
+
+ Returns an enumerator object that lets you iterate over all elements of the set. + This is the equivalent to objectEnumerator in the Cocoa implementation + of NSSet. +
+

Syntax

+
public IEnumerator GetEnumerator ()
+

Returns

+
The iterator for the set.
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

GetHashCode Method

+
+
+ Serves as a hash function for a Claunia.PropertyList.NSSet object. +
+

Syntax

+
public override int GetHashCode ()
+

Returns

+
A hash code for this instance that is suitable for use in hashing algorithms and data structures such as a + hash table.
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

IntersectsSet Method

+
+
+ Finds out whether at least one object is present in both sets. +
+

Syntax

+
public bool IntersectsSet (NSSet otherSet)
+

Parameters

+
+
+
+ otherSet +
+
The other set.
+
+
+

Returns

+
+ true if the intersection of both sets is empty, false otherwise.
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

IsSubsetOfSet Method

+
+
+ Finds out if this set is a subset of the given set. +
+

Syntax

+
public bool IsSubsetOfSet (NSSet otherSet)
+

Parameters

+
+
+
+ otherSet +
+
The other set.
+
+
+

Returns

+
+ true if all elements in this set are also present in the other set, falseotherwise.
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

Member Method

+
+
+ Determines whether the set contains an object equal to a given object + and returns that object if it is present. +
+

Syntax

+
public NSObject Member (NSObject obj)
+

Parameters

+
+
+
+ obj +
+
The object to look for.
+
+
+

Returns

+
The object if it is present, null otherwise.
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

RemoveObject Method

+
+
+ Removes an object from the set. +
+

Syntax

+
public void RemoveObject (NSObject obj)
+

Parameters

+
+
+
+ obj +
+
The object to remove.
+
+
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+
+
+
+ + + \ No newline at end of file diff --git a/DiscImageChef.Settings/docs/html/Claunia.PropertyList/NSString.html b/DiscImageChef.Settings/docs/html/Claunia.PropertyList/NSString.html new file mode 100644 index 00000000..4e9edd21 --- /dev/null +++ b/DiscImageChef.Settings/docs/html/Claunia.PropertyList/NSString.html @@ -0,0 +1,783 @@ + + + Claunia.PropertyList.NSString + + + + + + + +

NSString Class

+

+ A NSString contains a string. +

+
+

Syntax

+
public class NSString : NSObject, IComparable
+
+
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+

Members

+
+

+ See Also: Inherited members from + NSObject. +

+

Public Constructors

+
+
+ + + + + + + + + + + +
+
+
+
+
+ + NSString + (string)
+
+ Creates a NSString from a string. +
+
+
+
+
+ + NSString + (byte[], string)
+
+ Creates a NSString from its binary representation. +
+
+
+

Public Methods

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+
+ + Append + (NSString)
+ Appends a string to this string. +
+
+
+
+ + Append + (string)
+ Appends a string to this string. +
+
+
+
+ + CompareTo + (object) : int
+ Compares the current Claunia.PropertyList.NSString to the specified object. +
+
override
+
+ + Equals + (NSObject) : bool
+ Determines whether the specified Claunia.PropertyList.NSObject is equal to the current Claunia.PropertyList.NSString. +
+
abstract
+
+ + Equals + (NSObject) : bool
+ Determines if the specific NSObject is the same as the NSObject overriding this method. + (Inherited from NSObject.)
+
override
+
+ + Equals + (object) : bool
+ Determines whether the specified object is equal to the current Claunia.PropertyList.NSString. +
+
+
+
+ + GetContent + () : string
+ Gets this strings content. +
+
override
+
+ + GetHashCode + () : int
+ Serves as a hash function for a Claunia.PropertyList.NSString object. +
+
+
+
+ + Prepend + (NSString)
+ Prepends a string to this string. +
+
+
+
+ + Prepend + (string)
+ Prepends a string to this string. +
+
+
+
+ + SetContent + (string)
+ Sets the contents of this string. +
+
+
+
+ + ToObject + () : object
+ Converts this NSObject into an equivalent object + of the .NET Runtime Environment. +

Claunia.PropertyList.NSArray objects are converted to arrays.

Claunia.PropertyList.NSDictionary objects are converted to objects extending the Dictionary`2 class.

Claunia.PropertyList.NSSet objects are converted to objects extending the List`1 class.

Claunia.PropertyList.NSNumber objects are converted to primitive number values (int, long, double or bool).

Claunia.PropertyList.NSString objects are converted to string objects.

Claunia.PropertyList.NSData objects are converted to byte arrays.

Claunia.PropertyList.NSDate objects are converted to DateTime objects.

Claunia.PropertyList.UID objects are converted to byte arrays.

(Inherited from NSObject.)
+
override
+
+ + ToString + () : string
+ The textual representation of this NSString. +
+
+
+
+ + ToXmlPropertyList + () : string
+ Generates a valid XML property list including headers using this object as root. + (Inherited from NSObject.)
+
+
+
+
+
+

Member Details

+
+

NSString Constructor

+
+
+ Creates a NSString from a string. +
+

Syntax

+
public NSString (string text)
+

Parameters

+
+
+
+ text +
+
The string that will be contained in the NSString.
+
+
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

NSString Constructor

+
+
+ Creates a NSString from its binary representation. +
+

Syntax

+
public NSString (byte[] bytes, string encoding)
+

Parameters

+
+
+
+ bytes +
+
The binary representation.
+
+ encoding +
+
The encoding of the binary representation, the name of a supported charset.
+
+
+

Exceptions

+
+ + + + + + + + + +
TypeReason
+ ArgumentException + The encoding charset is invalid or not supported by the underlying platform.
+
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

Append Method

+
+
+ Appends a string to this string. +
+

Syntax

+
public void Append (NSString s)
+

Parameters

+
+
+
+ s +
+
The string to append.
+
+
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

Append Method

+
+
+ Appends a string to this string. +
+

Syntax

+
public void Append (string s)
+

Parameters

+
+
+
+ s +
+
The string to append.
+
+
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

CompareTo Method

+
+
+ Compares the current Claunia.PropertyList.NSString to the specified object. +
+

Syntax

+
public int CompareTo (object o)
+

Parameters

+
+
+
+ o +
+
Object to compare to the current Claunia.PropertyList.NSString.
+
+
+

Returns

+
A 32-bit signed integer that indicates the lexical relationship between the two comparands.
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

Equals Method

+
+
+ Determines whether the specified Claunia.PropertyList.NSObject is equal to the current Claunia.PropertyList.NSString. +
+

Syntax

+
public override bool Equals (NSObject obj)
+

Parameters

+
+
+
+ obj +
+
The Claunia.PropertyList.NSObject to compare with the current Claunia.PropertyList.NSString.
+
+
+

Returns

+
+ true if the specified Claunia.PropertyList.NSObject is equal to the current + Claunia.PropertyList.NSString; otherwise, false.
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

Equals Method

+
+
+ Determines whether the specified object is equal to the current Claunia.PropertyList.NSString. +
+

Syntax

+
public override bool Equals (object obj)
+

Parameters

+
+
+
+ obj +
+
The object to compare with the current Claunia.PropertyList.NSString.
+
+
+

Returns

+
+ true if the specified object is equal to the current + Claunia.PropertyList.NSString; otherwise, false.
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

GetContent Method

+
+
+ Gets this strings content. +
+

Syntax

+
public string GetContent ()
+

Returns

+
This NSString as .NET string object.
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

GetHashCode Method

+
+
+ Serves as a hash function for a Claunia.PropertyList.NSString object. +
+

Syntax

+
public override int GetHashCode ()
+

Returns

+
A hash code for this instance that is suitable for use in hashing algorithms and data structures such as a + hash table.
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

Prepend Method

+
+
+ Prepends a string to this string. +
+

Syntax

+
public void Prepend (NSString s)
+

Parameters

+
+
+
+ s +
+
The string to prepend.
+
+
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

Prepend Method

+
+
+ Prepends a string to this string. +
+

Syntax

+
public void Prepend (string s)
+

Parameters

+
+
+
+ s +
+
The string to prepend.
+
+
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

SetContent Method

+
+
+ Sets the contents of this string. +
+

Syntax

+
public void SetContent (string c)
+

Parameters

+
+
+
+ c +
+
The new content of this string object.
+
+
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

ToString Method

+
+
+ The textual representation of this NSString. +
+

Syntax

+
public override string ToString ()
+

Returns

+
The NSString's contents.
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+
+
+
+ + + \ No newline at end of file diff --git a/DiscImageChef.Settings/docs/html/Claunia.PropertyList/PropertyListFormatException.html b/DiscImageChef.Settings/docs/html/Claunia.PropertyList/PropertyListFormatException.html new file mode 100644 index 00000000..b28cc17c --- /dev/null +++ b/DiscImageChef.Settings/docs/html/Claunia.PropertyList/PropertyListFormatException.html @@ -0,0 +1,289 @@ + + + Claunia.PropertyList.PropertyListFormatException + + + + + + + +

PropertyListFormatException Class

+

+ A PropertyListFormatException is thrown by the various property list format parsers + when an error in the format of the given property list is encountered. +

+
+

Syntax

+
public class PropertyListFormatException : Exception
+
+
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+

Members

+
+

+ See Also: Inherited members from + Exception. +

+

Public Constructors

+
+
+ + + + + + +
+
+
+
+ + + Creates a new exception with the given message. +
+
+
+
+
+
+

Member Details

+
+

PropertyListFormatException Constructor

+
+
+ Creates a new exception with the given message. +
+

Syntax

+
public PropertyListFormatException (string message)
+

Parameters

+
+
+
+ message +
+
A message containing information about the nature of the exception.
+
+
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+
+
+
+ + + \ No newline at end of file diff --git a/DiscImageChef.Settings/docs/html/Claunia.PropertyList/PropertyListParser.html b/DiscImageChef.Settings/docs/html/Claunia.PropertyList/PropertyListParser.html new file mode 100644 index 00000000..24e888dd --- /dev/null +++ b/DiscImageChef.Settings/docs/html/Claunia.PropertyList/PropertyListParser.html @@ -0,0 +1,1002 @@ + + + Claunia.PropertyList.PropertyListParser + + + + + + + +

PropertyListParser Class

+

+ This class provides methods to parse property lists. It can handle files, + input streams and byte arrays. All known property list formats are supported. + This class also provides methods to save and convert property lists. +

+
+

Syntax

+
public static class PropertyListParser
+
+
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+

Members

+
+

+ See Also: Inherited members from + object. +

+

Public Methods

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
static
+
+ + ConvertToASCII + (System.IO.FileInfo, System.IO.FileInfo)
+ Converts a given property list file into ASCII format. +
+
static
+
+ + ConvertToBinary + (System.IO.FileInfo, System.IO.FileInfo)
+ Converts a given property list file into the OS X and iOS binary format. +
+
static
+
+ + ConvertToGnuStepASCII + (System.IO.FileInfo, System.IO.FileInfo)
+ Converts a given property list file into GnuStep ASCII format. +
+
static
+
+ + ConvertToXml + (System.IO.FileInfo, System.IO.FileInfo)
+ Converts a given property list file into the OS X and iOS XML format. +
+
static
+
+ + Parse + (byte[]) : NSObject
+ Parses a property list from a byte array. +
+
static
+
+ + Parse + (System.IO.FileInfo) : NSObject
+ Parses a property list from a file. +
+
static
+
+ + Parse + (System.IO.Stream) : NSObject
+ Parses a property list from an Stream. +
+
static
+
+ + Parse + (string) : NSObject
+ Parses a property list from a file. +
+
static
+
+ + SaveAsASCII + (NSArray, System.IO.FileInfo)
+ Saves a property list with the given object as root into a ASCII file. +
+
static
+
+ + SaveAsASCII + (NSDictionary, System.IO.FileInfo)
+ Saves a property list with the given object as root into a ASCII file. +
+
static
+
+ + SaveAsBinary + (NSObject, System.IO.FileInfo)
+ Saves a property list with the given object as root into a binary file. +
+
static
+
+ + SaveAsBinary + (NSObject, System.IO.Stream)
+ Saves a property list with the given object as root in binary format into an output stream. +
+
static
+
+ + SaveAsGnuStepASCII + (NSArray, System.IO.FileInfo)
+ Saves a property list with the given object as root into a GnuStep ASCII file. +
+
static
+
+ + SaveAsGnuStepASCII + (NSDictionary, System.IO.FileInfo)
+ Saves a property list with the given object as root into a GnuStep ASCII file. +
+
static
+
+ + SaveAsXml + (NSObject, System.IO.FileInfo)
+ Saves a property list with the given object as root into a XML file. +
+
static
+
+ + SaveAsXml + (NSObject, System.IO.Stream)
+ Saves a property list with the given object as root in XML format into an output stream. +
+
+
+
+
+
+

Member Details

+
+

ConvertToASCII Method

+
+
+ Converts a given property list file into ASCII format. +
+

Syntax

+
public static void ConvertToASCII (System.IO.FileInfo inFile, System.IO.FileInfo outFile)
+

Parameters

+
+
+
+ inFile +
+
The source file.
+
+ outFile +
+
The target file.
+
+
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

ConvertToBinary Method

+
+
+ Converts a given property list file into the OS X and iOS binary format. +
+

Syntax

+
public static void ConvertToBinary (System.IO.FileInfo inFile, System.IO.FileInfo outFile)
+

Parameters

+
+
+
+ inFile +
+
The source file.
+
+ outFile +
+
The target file.
+
+
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

ConvertToGnuStepASCII Method

+
+
+ Converts a given property list file into GnuStep ASCII format. +
+

Syntax

+
public static void ConvertToGnuStepASCII (System.IO.FileInfo inFile, System.IO.FileInfo outFile)
+

Parameters

+
+
+
+ inFile +
+
The source file.
+
+ outFile +
+
The target file.
+
+
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

ConvertToXml Method

+
+
+ Converts a given property list file into the OS X and iOS XML format. +
+

Syntax

+
public static void ConvertToXml (System.IO.FileInfo inFile, System.IO.FileInfo outFile)
+

Parameters

+
+
+
+ inFile +
+
The source file.
+
+ outFile +
+
The target file.
+
+
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

Parse Method

+
+
+ Parses a property list from a byte array. +
+

Syntax

+
public static NSObject Parse (byte[] bytes)
+

Parameters

+
+
+
+ bytes +
+
The property list data as a byte array.
+
+
+

Returns

+
The root object in the property list. This is usually a NSDictionary but can also be a NSArray.
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

Parse Method

+
+
+ Parses a property list from a file. +
+

Syntax

+
public static NSObject Parse (System.IO.FileInfo f)
+

Parameters

+
+
+
+ f +
+
The property list file.
+
+
+

Returns

+
The root object in the property list. This is usually a NSDictionary but can also be a NSArray.
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

Parse Method

+
+
+ Parses a property list from an Stream. +
+

Syntax

+
public static NSObject Parse (System.IO.Stream fs)
+

Parameters

+
+
+
+ fs +
+
The Stream delivering the property list data.
+
+
+

Returns

+
The root object of the property list. This is usually a NSDictionary but can also be a NSArray.
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

Parse Method

+
+
+ Parses a property list from a file. +
+

Syntax

+
public static NSObject Parse (string filePath)
+

Parameters

+
+
+
+ filePath +
+
Path to the property list file.
+
+
+

Returns

+
The root object in the property list. This is usually a NSDictionary but can also be a NSArray.
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

SaveAsASCII Method

+
+
+ Saves a property list with the given object as root into a ASCII file. +
+

Syntax

+
public static void SaveAsASCII (NSArray root, System.IO.FileInfo outFile)
+

Parameters

+
+
+
+ root +
+
The root object.
+
+ outFile +
+
The output file.
+
+
+

Exceptions

+
+ + + + + + + + + +
TypeReason
+ System.IO.IOException + When an error occurs during the writing process.
+
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

SaveAsASCII Method

+
+
+ Saves a property list with the given object as root into a ASCII file. +
+

Syntax

+
public static void SaveAsASCII (NSDictionary root, System.IO.FileInfo outFile)
+

Parameters

+
+
+
+ root +
+
The root object.
+
+ outFile +
+
The output file.
+
+
+

Exceptions

+
+ + + + + + + + + +
TypeReason
+ System.IO.IOException + When an error occurs during the writing process.
+
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

SaveAsBinary Method

+
+
+ Saves a property list with the given object as root into a binary file. +
+

Syntax

+
public static void SaveAsBinary (NSObject root, System.IO.FileInfo outFile)
+

Parameters

+
+
+
+ root +
+
The root object.
+
+ outFile +
+
The output file.
+
+
+

Exceptions

+
+ + + + + + + + + +
TypeReason
+ System.IO.IOException + When an error occurs during the writing process.
+
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

SaveAsBinary Method

+
+
+ Saves a property list with the given object as root in binary format into an output stream. +
+

Syntax

+
public static void SaveAsBinary (NSObject root, System.IO.Stream outStream)
+

Parameters

+
+
+
+ root +
+
The root object.
+
+ outStream +
+
The output stream.
+
+
+

Exceptions

+
+ + + + + + + + + +
TypeReason
+ System.IO.IOException + When an error occurs during the writing process.
+
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

SaveAsGnuStepASCII Method

+
+
+ Saves a property list with the given object as root into a GnuStep ASCII file. +
+

Syntax

+
public static void SaveAsGnuStepASCII (NSArray root, System.IO.FileInfo outFile)
+

Parameters

+
+
+
+ root +
+
The root object.
+
+ outFile +
+
The output file.
+
+
+

Exceptions

+
+ + + + + + + + + +
TypeReason
+ System.IO.IOException + When an error occurs during the writing process.
+
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

SaveAsGnuStepASCII Method

+
+
+ Saves a property list with the given object as root into a GnuStep ASCII file. +
+

Syntax

+
public static void SaveAsGnuStepASCII (NSDictionary root, System.IO.FileInfo outFile)
+

Parameters

+
+
+
+ root +
+
The root object.
+
+ outFile +
+
The output file.
+
+
+

Exceptions

+
+ + + + + + + + + +
TypeReason
+ System.IO.IOException + When an error occurs during the writing process.
+
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

SaveAsXml Method

+
+
+ Saves a property list with the given object as root into a XML file. +
+

Syntax

+
public static void SaveAsXml (NSObject root, System.IO.FileInfo outFile)
+

Parameters

+
+
+
+ root +
+
The root object.
+
+ outFile +
+
The output file.
+
+
+

Exceptions

+
+ + + + + + + + + +
TypeReason
+ System.IO.IOException + When an error occurs during the writing process.
+
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

SaveAsXml Method

+
+
+ Saves a property list with the given object as root in XML format into an output stream. +
+

Syntax

+
public static void SaveAsXml (NSObject root, System.IO.Stream outStream)
+

Parameters

+
+
+
+ root +
+
The root object.
+
+ outStream +
+
The output stream.
+
+
+

Exceptions

+
+ + + + + + + + + +
TypeReason
+ System.IO.IOException + When an error occurs during the writing process.
+
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+
+
+
+ + + \ No newline at end of file diff --git a/DiscImageChef.Settings/docs/html/Claunia.PropertyList/UID.html b/DiscImageChef.Settings/docs/html/Claunia.PropertyList/UID.html new file mode 100644 index 00000000..0d5656f6 --- /dev/null +++ b/DiscImageChef.Settings/docs/html/Claunia.PropertyList/UID.html @@ -0,0 +1,445 @@ + + + Claunia.PropertyList.UID + + + + + + + +

UID Class

+

+ An UID. Only found in binary property lists that are keyed archives. +

+
+

Syntax

+
public class UID : NSObject
+
+
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+

Members

+
+

+ See Also: Inherited members from + NSObject. +

+

Public Constructors

+
+
+ + + + + + +
+
+
+
+
+ + UID + (string, byte[])
+
+ Initializes a new instance of the Claunia.PropertyList.UID class. +
+
+
+

Public Properties

+
+
+ + + + + + + + + + + +
[read-only]
+ + Bytes + + + + byte[]. + Gets the bytes. +
[read-only]
+ + Name + + + + string + . + Gets the name. +
+
+
+

Public Methods

+
+
+ + + + + + + + + + + + + + + + + +
+
override
+
+ + Equals + (NSObject) : bool
+ Determines whether the specified Claunia.PropertyList.NSObject is equal to the current Claunia.PropertyList.UID. +
+
abstract
+
+ + Equals + (NSObject) : bool
+ Determines if the specific NSObject is the same as the NSObject overriding this method. + (Inherited from NSObject.)
+
+
+
+ + ToObject + () : object
+ Converts this NSObject into an equivalent object + of the .NET Runtime Environment. +

Claunia.PropertyList.NSArray objects are converted to arrays.

Claunia.PropertyList.NSDictionary objects are converted to objects extending the Dictionary`2 class.

Claunia.PropertyList.NSSet objects are converted to objects extending the List`1 class.

Claunia.PropertyList.NSNumber objects are converted to primitive number values (int, long, double or bool).

Claunia.PropertyList.NSString objects are converted to string objects.

Claunia.PropertyList.NSData objects are converted to byte arrays.

Claunia.PropertyList.NSDate objects are converted to DateTime objects.

Claunia.PropertyList.UID objects are converted to byte arrays.

(Inherited from NSObject.)
+
+
+
+ + ToXmlPropertyList + () : string
+ Generates a valid XML property list including headers using this object as root. + (Inherited from NSObject.)
+
+
+
+
+
+

Member Details

+
+

UID Constructor

+
+
+ Initializes a new instance of the Claunia.PropertyList.UID class. +
+

Syntax

+
public UID (string name, byte[] bytes)
+

Parameters

+
+
+
+ name +
+
Name.
+
+ bytes +
+
Bytes.
+
+
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

Bytes Property

+
+
+ Gets the bytes. +
+

Syntax

+
public byte[] Bytes { get; }
+

Value

+
The bytes.
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

Equals Method

+
+
+ Determines whether the specified Claunia.PropertyList.NSObject is equal to the current Claunia.PropertyList.UID. +
+

Syntax

+
public override bool Equals (NSObject obj)
+

Parameters

+
+
+
+ obj +
+
The Claunia.PropertyList.NSObject to compare with the current Claunia.PropertyList.UID.
+
+
+

Returns

+
+ true if the specified Claunia.PropertyList.NSObject is equal to the current + Claunia.PropertyList.UID; otherwise, false.
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

Name Property

+
+
+ Gets the name. +
+

Syntax

+
public string Name { get; }
+

Value

+
The name.
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+
+
+
+ + + \ No newline at end of file diff --git a/DiscImageChef.Settings/docs/html/Claunia.PropertyList/XmlPropertyListParser.html b/DiscImageChef.Settings/docs/html/Claunia.PropertyList/XmlPropertyListParser.html new file mode 100644 index 00000000..bbb5271c --- /dev/null +++ b/DiscImageChef.Settings/docs/html/Claunia.PropertyList/XmlPropertyListParser.html @@ -0,0 +1,362 @@ + + + Claunia.PropertyList.XmlPropertyListParser + + + + + + + +

XmlPropertyListParser Class

+

+ Parses XML property lists. +

+
+

Syntax

+
public static class XmlPropertyListParser
+
+
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+

Members

+
+

+ See Also: Inherited members from + object. +

+

Public Methods

+
+
+ + + + + + + + + + + + + +
+
static
+
+ + Parse + (byte[]) : NSObject
+ Parses a XML property list from a byte array. +
+
static
+
+ + Parse + (System.IO.FileInfo) : NSObject
+ Parses a XML property list file. +
+
static
+
+ + Parse + (System.IO.Stream) : NSObject
+ Parses a XML property list from an input stream. +
+
+
+
+
+
+

Member Details

+
+

Parse Method

+
+
+ Parses a XML property list from a byte array. +
+

Syntax

+
public static NSObject Parse (byte[] bytes)
+

Parameters

+
+
+
+ bytes +
+
The byte array containing the property list's data.
+
+
+

Returns

+
The root object of the property list. This is usually a NSDictionary but can also be a NSArray.
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

Parse Method

+
+
+ Parses a XML property list file. +
+

Syntax

+
public static NSObject Parse (System.IO.FileInfo f)
+

Parameters

+
+
+
+ f +
+
The XML property list file.
+
+
+

Returns

+
The root object of the property list. This is usually a NSDictionary but can also be a NSArray.
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+

Parse Method

+
+
+ Parses a XML property list from an input stream. +
+

Syntax

+
public static NSObject Parse (System.IO.Stream str)
+

Parameters

+
+
+
+ str +
+
The input stream pointing to the property list's data.
+
+
+

Returns

+
The root object of the property list. This is usually a NSDictionary but can also be a NSArray.
+

Remarks

+
+ Documentation for this section has not yet been entered. +
+

Requirements

+
+ Namespace: Claunia.PropertyList
Assembly: plist-cil (in plist-cil.dll)
Assembly Versions: 1.13.0.0, 1.14.0.0
+
+
+
+
+
+ + + \ No newline at end of file diff --git a/DiscImageChef.Settings/docs/html/Claunia.PropertyList/index.html b/DiscImageChef.Settings/docs/html/Claunia.PropertyList/index.html new file mode 100644 index 00000000..8f340908 --- /dev/null +++ b/DiscImageChef.Settings/docs/html/Claunia.PropertyList/index.html @@ -0,0 +1,394 @@ + + + plist-cil + + + + + +
+ plist-cil +
+

Claunia.PropertyList Namespace

+

+

+
+
+
+

Namespace

+

+ Documentation for this section has not yet been entered. +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TypeDescription
+ ASCIIPropertyListParser + +

+ Parser for ASCII property lists. Supports Apple OS X/iOS and GnuStep/NeXTSTEP format. + This parser is based on the recursive descent paradigm, but the underlying grammar + is not explicitely defined. +

+

+ Resources on ASCII property list format: +

+

+ https://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/PropertyLists/OldStylePlists/OldStylePLists.html +

+

+ Property List Programming Guide - Old-Style ASCII Property Lists +

+

+ http://www.gnustep.org/resources/documentation/Developer/Base/Reference/NSPropertyList.html +

+

+ GnuStep - NSPropertyListSerialization class documentation +

+
+ BinaryPropertyListParser + +

+ Parses property lists that are in Apple's binary format. + Use this class when you are sure about the format of the property list. + Otherwise use the PropertyListParser class. +

+

+ Parsing is done by calling the static Claunia.PropertyList.BinaryPropertyListParser.Parse(Byte[]), + Claunia.PropertyList.BinaryPropertyListParser.Parse(System.IO.FileInfo) and Claunia.PropertyList.BinaryPropertyListParser.Parse(System.IO.Stream) methods. +

+
+ BinaryPropertyListWriter + +

+ A BinaryPropertyListWriter is a helper class for writing out + binary property list files. +

+

+ It contains an output stream and various structures for keeping track + of which NSObjects have already been serialized, and where they were + put in the file. +

+
+ NSArray + + Represents an Array. +
+ NSData + + NSData objects are wrappers for byte buffers +
+ NSDate + + Represents a date +
+ NSDictionary + +

+ A NSDictionary is a collection of keys and values, essentially a Dictionary. + The keys are simple Strings whereas the values can be any kind of NSObject. +

+

+ You can access the keys through the function Claunia.PropertyList.NSDictionary.Keys. +

+

+ Access to the objects stored for each key is given through the function + Claunia.PropertyList.NSDictionary.ObjectForKey(string). +

+
+ NSNumber + + A number whose value is either an integer, a real number or bool. +
+ NSObject + +

+ Abstract interface for any object contained in a property list. +

+

+ The names and functions of the various objects orient themselves + towards Apple's Cocoa API. +

+
+ NSSet + +

+ A set is an interface to an unordered collection of objects. +

+

+ This implementation uses a List`1as the underlying + data structure. +

+
+ NSString + + A NSString contains a string. +
+ PropertyListFormatException + + A PropertyListFormatException is thrown by the various property list format parsers + when an error in the format of the given property list is encountered. +
+ PropertyListParser + + This class provides methods to parse property lists. It can handle files, + input streams and byte arrays. All known property list formats are supported. + This class also provides methods to save and convert property lists. +
+ UID + + An UID. Only found in binary property lists that are keyed archives. +
+ XmlPropertyListParser + + Parses XML property lists. +
+
+
+
+
+ + + \ No newline at end of file diff --git a/DiscImageChef.Settings/docs/html/index.html b/DiscImageChef.Settings/docs/html/index.html new file mode 100644 index 00000000..bfc4b8d1 --- /dev/null +++ b/DiscImageChef.Settings/docs/html/index.html @@ -0,0 +1,398 @@ + + + plist-cil + + + + + +
+
+

plist-cil

+

+

+ Documentation for this section has not yet been entered. +
+

+
+
+
+

+ Claunia.PropertyList Namespace +

+

+ Documentation for this section has not yet been entered. +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TypeDescription
+ ASCIIPropertyListParser + +

+ Parser for ASCII property lists. Supports Apple OS X/iOS and GnuStep/NeXTSTEP format. + This parser is based on the recursive descent paradigm, but the underlying grammar + is not explicitely defined. +

+

+ Resources on ASCII property list format: +

+

+ https://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/PropertyLists/OldStylePlists/OldStylePLists.html +

+

+ Property List Programming Guide - Old-Style ASCII Property Lists +

+

+ http://www.gnustep.org/resources/documentation/Developer/Base/Reference/NSPropertyList.html +

+

+ GnuStep - NSPropertyListSerialization class documentation +

+
+ BinaryPropertyListParser + +

+ Parses property lists that are in Apple's binary format. + Use this class when you are sure about the format of the property list. + Otherwise use the PropertyListParser class. +

+

+ Parsing is done by calling the static Claunia.PropertyList.BinaryPropertyListParser.Parse(Byte[]), + Claunia.PropertyList.BinaryPropertyListParser.Parse(System.IO.FileInfo) and Claunia.PropertyList.BinaryPropertyListParser.Parse(System.IO.Stream) methods. +

+
+ BinaryPropertyListWriter + +

+ A BinaryPropertyListWriter is a helper class for writing out + binary property list files. +

+

+ It contains an output stream and various structures for keeping track + of which NSObjects have already been serialized, and where they were + put in the file. +

+
+ NSArray + + Represents an Array. +
+ NSData + + NSData objects are wrappers for byte buffers +
+ NSDate + + Represents a date +
+ NSDictionary + +

+ A NSDictionary is a collection of keys and values, essentially a Dictionary. + The keys are simple Strings whereas the values can be any kind of NSObject. +

+

+ You can access the keys through the function Claunia.PropertyList.NSDictionary.Keys. +

+

+ Access to the objects stored for each key is given through the function + Claunia.PropertyList.NSDictionary.ObjectForKey(string). +

+
+ NSNumber + + A number whose value is either an integer, a real number or bool. +
+ NSObject + +

+ Abstract interface for any object contained in a property list. +

+

+ The names and functions of the various objects orient themselves + towards Apple's Cocoa API. +

+
+ NSSet + +

+ A set is an interface to an unordered collection of objects. +

+

+ This implementation uses a List`1as the underlying + data structure. +

+
+ NSString + + A NSString contains a string. +
+ PropertyListFormatException + + A PropertyListFormatException is thrown by the various property list format parsers + when an error in the format of the given property list is encountered. +
+ PropertyListParser + + This class provides methods to parse property lists. It can handle files, + input streams and byte arrays. All known property list formats are supported. + This class also provides methods to save and convert property lists. +
+ UID + + An UID. Only found in binary property lists that are keyed archives. +
+ XmlPropertyListParser + + Parses XML property lists. +
+
+
+
+
+ + + \ No newline at end of file diff --git a/DiscImageChef.Settings/docs/mono/Claunia.PropertyList/ASCIIPropertyListParser.xml b/DiscImageChef.Settings/docs/mono/Claunia.PropertyList/ASCIIPropertyListParser.xml new file mode 100644 index 00000000..645358f5 --- /dev/null +++ b/DiscImageChef.Settings/docs/mono/Claunia.PropertyList/ASCIIPropertyListParser.xml @@ -0,0 +1,750 @@ + + + + + plist-cil + 1.13.0.0 + 1.14.0.0 + + + System.Object + + + + + + Parser for ASCII property lists. Supports Apple OS X/iOS and GnuStep/NeXTSTEP format. + This parser is based on the recursive descent paradigm, but the underlying grammar + is not explicitely defined. + + + Resources on ASCII property list format: + + + https://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/PropertyLists/OldStylePlists/OldStylePLists.html + + + Property List Programming Guide - Old-Style ASCII Property Lists + + + http://www.gnustep.org/resources/documentation/Developer/Base/Reference/NSPropertyList.html + + + GnuStep - NSPropertyListSerialization class documentation + + + To be added. + + + + + + Constructor + + 1.13.0.0 + 1.14.0.0 + + + + To be added. + To be added. + + + + + + Field + + 1.13.0.0 + 1.14.0.0 + + + System.Char + + + + Token of NSArray start + + To be added. + + + + + + Field + + 1.13.0.0 + 1.14.0.0 + + + System.Char + + + + Token of NSArray end + + To be added. + + + + + + Field + + 1.13.0.0 + 1.14.0.0 + + + System.Char + + + + Token of NSArray item delimiter + + To be added. + + + + + + Field + + 1.13.0.0 + 1.14.0.0 + + + System.Char + + + + Token for comment start + + To be added. + + + + + + Field + + 1.13.0.0 + 1.14.0.0 + + + System.Char + + + + Token of NSData start + + To be added. + + + + + + Field + + 1.13.0.0 + 1.14.0.0 + + + System.Char + + + + Token of NSData end + + To be added. + + + + + + Field + + 1.13.0.0 + 1.14.0.0 + + + System.Char + + + + Token of GSBoolean start + + To be added. + + + + + + Field + + 1.13.0.0 + 1.14.0.0 + + + System.Char + + + + Token for GSBoolen's false + To be added. + + + + + + Field + + 1.13.0.0 + 1.14.0.0 + + + System.Char + + + + Token for GSBoolen's true + To be added. + + + + + + Field + + 1.13.0.0 + 1.14.0.0 + + + System.Char + + + + Token of GSDate start + + To be added. + + + + + + Field + + 1.13.0.0 + 1.14.0.0 + + + System.Char + + + + Token for GSInteger + + To be added. + + + + + + Field + + 1.13.0.0 + 1.14.0.0 + + + System.Char + + + + Token of GSObject start + + To be added. + + + + + + Field + + 1.13.0.0 + 1.14.0.0 + + + System.Char + + + + Token for GSReal + + To be added. + + + + + + Field + + 1.13.0.0 + 1.14.0.0 + + + System.Char + + + + Token for NSDate date and time delimiter + + To be added. + + + + + + Field + + 1.13.0.0 + 1.14.0.0 + + + System.Char + + + + Token for NSDate end + + To be added. + + + + + + Field + + 1.13.0.0 + 1.14.0.0 + + + System.Char + + + + Token for NSDate date field delimited + + To be added. + + + + + + Field + + 1.13.0.0 + 1.14.0.0 + + + System.Char + + + + Token for GSDate date and time delimiter + + To be added. + + + + + + Field + + 1.13.0.0 + 1.14.0.0 + + + System.Char + + + + Token for NSDate time field delimiter + + To be added. + + + + + + Field + + 1.13.0.0 + 1.14.0.0 + + + System.Char + + + + Token of NSDictionary assignment + + To be added. + + + + + + Field + + 1.13.0.0 + 1.14.0.0 + + + System.Char + + + + Token of NSDictionary start + + To be added. + + + + + + Field + + 1.13.0.0 + 1.14.0.0 + + + System.Char + + + + Token of NSDictionary end + + To be added. + + + + + + Field + + 1.13.0.0 + 1.14.0.0 + + + System.Char + + + + Token of NSDictionary item delimiter + + To be added. + + + + + + Field + + 1.13.0.0 + 1.14.0.0 + + + System.Char + + + + End token for multiline comment + + To be added. + + + + + + Field + + 1.13.0.0 + 1.14.0.0 + + + System.Char + + + + Second token for multiline comment + + To be added. + + + + + + Method + + 1.13.0.0 + 1.14.0.0 + + + Claunia.PropertyList.NSObject + + + + + Parses the property list from the beginning and returns the root object + of the property list. + + The root object of the property list. This can either be a NSDictionary or a NSArray. + To be added. + When an error occured during parsing + + + + + + Method + + 1.13.0.0 + 1.14.0.0 + + + Claunia.PropertyList.NSObject + + + + + + The ASCII property list data. + + Parses an ASCII property list from a byte array. + + The root object of the property list. This is usually a NSDictionary but can also be a NSArray. + To be added. + When an error occurs during parsing. + + + + + + Method + + 1.13.0.0 + 1.14.0.0 + + + Claunia.PropertyList.NSObject + + + + + + The ASCII property list file.. + + Parses an ASCII property list file. + + The root object of the property list. This is usually a NSDictionary but can also be a NSArray. + To be added. + When an error occurs during parsing. + When an error occured while reading from the input stream. + + + + + + Method + + 1.13.0.0 + 1.14.0.0 + + + Claunia.PropertyList.NSObject + + + + + + The input stream that points to the property list's data. + + Parses an ASCII property list from an input stream. + + The root object of the property list. This is usually a NSDictionary but can also be a NSArray. + To be added. + When an error occurs during parsing. + + + + + + + Method + + 1.13.0.0 + 1.14.0.0 + + + System.String + + + + + + The escaped string according to the ASCII property list format, without leading and trailing quotation marks. + + Parses a string according to the format specified for ASCII property lists. + Such strings can contain escape sequences which are unescaped in this method. + + The unescaped string in UTF-8 or ASCII format, depending on the contained characters. + To be added. + If the en-/decoder for the UTF-8 or ASCII encoding could not be loaded + If the string is encoded neither in ASCII nor in UTF-8 + + + + + + Field + + 1.13.0.0 + 1.14.0.0 + + + System.Char + + + + Token of quoted NSString start + + To be added. + + + + + + Field + + 1.13.0.0 + 1.14.0.0 + + + System.Char + + + + Token of quoted NSString end + + To be added. + + + + + + Field + + 1.13.0.0 + 1.14.0.0 + + + System.Char + + + + Token of quoted NSString escaped character + + To be added. + + + + + + Field + + 1.13.0.0 + 1.14.0.0 + + + System.Char + + + + Second token for singleline comment + + To be added. + + + + + + Field + + 1.13.0.0 + 1.14.0.0 + + + System.Char + + + + A carriage return + + To be added. + + + + + + Field + + 1.13.0.0 + 1.14.0.0 + + + System.Char + + + + A newline + + To be added. + + + + + + Field + + 1.13.0.0 + 1.14.0.0 + + + System.Char + + + + A space + + To be added. + + + + + + Field + + 1.13.0.0 + 1.14.0.0 + + + System.Char + + + + A tabulator + + To be added. + + + + diff --git a/DiscImageChef.Settings/docs/mono/Claunia.PropertyList/BinaryPropertyListParser.xml b/DiscImageChef.Settings/docs/mono/Claunia.PropertyList/BinaryPropertyListParser.xml new file mode 100644 index 00000000..93c83c4b --- /dev/null +++ b/DiscImageChef.Settings/docs/mono/Claunia.PropertyList/BinaryPropertyListParser.xml @@ -0,0 +1,296 @@ + + + + + plist-cil + 1.13.0.0 + 1.14.0.0 + + + System.Object + + + + + + Parses property lists that are in Apple's binary format. + Use this class when you are sure about the format of the property list. + Otherwise use the PropertyListParser class. + + + Parsing is done by calling the static , + and methods. + + + To be added. + + + + + + Constructor + + 1.13.0.0 + 1.14.0.0 + + + + + Protected constructor so that instantiation is fully controlled by the + static parse methods. + + To be added. + + + + + + + Method + + 1.13.0.0 + 1.14.0.0 + + + System.Byte[] + + + + + + + + The source array. + The index from which to start copying. + The index until which to copy. + + Copies a part of a byte array into a new array. + + The copied array. + To be added. + + + + + + Method + + 1.13.0.0 + 1.14.0.0 + + + Claunia.PropertyList.NSObject + + + + + + The binary property list's data. + + Parses a binary property list from a byte array. + + The root object of the property list. This is usually a NSDictionary but can also be a NSArray. + To be added. + When the property list's format could not be parsed. + + + + + + Method + + 1.13.0.0 + 1.14.0.0 + + + Claunia.PropertyList.NSObject + + + + + + The binary property list file + + Parses a binary property list file. + + The root object of the property list. This is usually a NSDictionary but can also be a NSArray. + To be added. + When the property list's format could not be parsed. + + + + + + Method + + 1.13.0.0 + 1.14.0.0 + + + Claunia.PropertyList.NSObject + + + + + + The input stream that points to the property list's data. + + Parses a binary property list from an input stream. + + The root object of the property list. This is usually a NSDictionary but can also be a NSArray. + To be added. + When the property list's format could not be parsed. + + + + + + Method + + 1.13.0.0 + 1.14.0.0 + + + System.Double + + + + + + The bytes representing the double. + + Parses a double from a (big-endian) byte array. + + The double represented by the given bytes. + To be added. + + + + + + Method + + 1.13.0.0 + 1.14.0.0 + + + System.Double + + + + + + + + The bytes representing the double. + Beginning of the double in the byte array. + End of the double in the byte array. + + Parses a double from a (big-endian) byte array. + + The double represented by the given bytes. + To be added. + + + + + + Method + + 1.13.0.0 + 1.14.0.0 + + + System.Int64 + + + + + + The bytes representing the long integer. + + Parses a long from a (big-endian) byte array. + + The long integer represented by the given bytes. + To be added. + + + + + + Method + + 1.13.0.0 + 1.14.0.0 + + + System.Int64 + + + + + + + + The bytes representing the long integer. + Beginning of the long in the byte array. + End of the long in the byte array. + + Parses a long from a (big-endian) byte array. + + The long integer represented by the given bytes. + To be added. + + + + + + Method + + 1.13.0.0 + 1.14.0.0 + + + System.Int64 + + + + + + The unsigned integer represented by the given bytes. + + Parses an unsigned integers from a byte array. + + The byte array containing the unsigned integer. + To be added. + + + + + + Method + + 1.13.0.0 + 1.14.0.0 + + + System.Int64 + + + + + + + + The byte array containing the unsigned integer. + Beginning of the unsigned int in the byte array. + End of the unsigned int in the byte array. + + Parses an unsigned integer from a byte array. + + The unsigned integer represented by the given bytes. + To be added. + + + + diff --git a/DiscImageChef.Settings/docs/mono/Claunia.PropertyList/BinaryPropertyListWriter.xml b/DiscImageChef.Settings/docs/mono/Claunia.PropertyList/BinaryPropertyListWriter.xml new file mode 100644 index 00000000..808803f1 --- /dev/null +++ b/DiscImageChef.Settings/docs/mono/Claunia.PropertyList/BinaryPropertyListWriter.xml @@ -0,0 +1,180 @@ + + + + + plist-cil + 1.13.0.0 + 1.14.0.0 + + + System.Object + + + + + + A BinaryPropertyListWriter is a helper class for writing out + binary property list files. + + + It contains an output stream and various structures for keeping track + of which NSObjects have already been serialized, and where they were + put in the file. + + + To be added. + + + + + + Field + + 1.13.0.0 + 1.14.0.0 + + + System.Int32 + + 0 + + + Binary property list version 0.0 + + To be added. + + + + + + Field + + 1.13.0.0 + 1.14.0.0 + + + System.Int32 + + 10 + + + Binary property list version 1.0 + + To be added. + + + + + + Field + + 1.13.0.0 + 1.14.0.0 + + + System.Int32 + + 15 + + + Binary property list version 1.5 + + To be added. + + + + + + Field + + 1.13.0.0 + 1.14.0.0 + + + System.Int32 + + 20 + + + Binary property list version 2.0 + + To be added. + + + + + + Method + + 1.13.0.0 + 1.14.0.0 + + + System.Void + + + + + + + the file to write to + the source of the data to write to the file + + Writes a binary plist file with the given object as the root. + + To be added. + + + + + + + Method + + 1.13.0.0 + 1.14.0.0 + + + System.Void + + + + + + + the stream to write to + the source of the data to write to the stream + + Writes a binary plist serialization of the given object as the root. + + To be added. + + + + + + + Method + + 1.13.0.0 + 1.14.0.0 + + + System.Byte[] + + + + + + The root object of the property list + + Writes a binary plist serialization of the given object as the root + into a byte array. + + The byte array containing the serialized property list + To be added. + + + + + diff --git a/DiscImageChef.Settings/docs/mono/Claunia.PropertyList/NSArray.xml b/DiscImageChef.Settings/docs/mono/Claunia.PropertyList/NSArray.xml new file mode 100644 index 00000000..7bf12514 --- /dev/null +++ b/DiscImageChef.Settings/docs/mono/Claunia.PropertyList/NSArray.xml @@ -0,0 +1,429 @@ + + + + + plist-cil + 1.13.0.0 + 1.14.0.0 + + + Claunia.PropertyList.NSObject + + + + + Represents an Array. + + To be added. + + + + + + Constructor + + 1.13.0.0 + 1.14.0.0 + + + + + + System.ParamArray + + + + + + The array which should be wrapped by the NSArray. + + Creates a array from an existing one + + To be added. + + + + + + Constructor + + 1.13.0.0 + 1.14.0.0 + + + + + + The number of elements this array will be able to hold. + + Creates an empty array of the given length. + + To be added. + + + + + + Method + + 1.13.0.0 + 1.14.0.0 + + + System.Boolean + + + + + + The object to look for. + + Checks whether an object is present in the array or whether it is equal + to any of the objects in the array. + + + true, when the object could be found. false otherwise. + To be added. + + + + + + Property + + 1.13.0.0 + 1.14.0.0 + + + System.Int32 + + + + Returns the size of the array. + + The number of elements that this array can store. + To be added. + + + + + + Method + + 1.13.0.0 + 1.14.0.0 + + + System.Boolean + + + + + + The to compare with the current . + + Determines whether the specified is equal to the current . + + + true if the specified is equal to the current + ; otherwise, false. + To be added. + + + + + + Method + + 1.13.0.0 + 1.14.0.0 + + + System.Boolean + + + + + + The to compare with the current . + + Determines whether the specified is equal to the current . + + + true if the specified is equal to the current + ; otherwise, false. + To be added. + + + + + + Method + + 1.13.0.0 + 1.14.0.0 + + + Claunia.PropertyList.NSObject[] + + + + + Returns the array of NSObjects represented by this NSArray. + Any changes to the values of this array will also affect the NSArray. + + The actual array represented by this NSArray. + To be added. + + + + + + Method + + 1.13.0.0 + 1.14.0.0 + + + System.Int32 + + + + + Serves as a hash function for a object. + + A hash code for this instance that is suitable for use in hashing algorithms and data structures such as a + hash table. + To be added. + + + + + + Method + + 1.13.0.0 + 1.14.0.0 + + + System.Int32 + + + + + + The object to look for. + + Searches for an object in the array. If it is found its index will be + returned. This method only returns the index of an object that is + identical to the given one. Thus objects that might contain the + same value as the given one will not be considered. + + The index of the object, if it was found. -1 otherwise. + To be added. + + + + + + Method + + 1.13.0.0 + 1.14.0.0 + + + System.Int32 + + + + + + The object to look for. + + Searches for an object in the array. If it is found its index will be + returned. This method also returns an index if the object is not the same + as the one stored in the array but has equal contents. + + The index of the object, if it was found. -1 otherwise. + To be added. + + + + + + Method + + 1.13.0.0 + 1.14.0.0 + + + Claunia.PropertyList.NSObject + + + + + Returns the last object contained in this array. + + The value of the highest index in the array. + To be added. + + + + + + Method + + 1.13.0.0 + 1.14.0.0 + + + Claunia.PropertyList.NSObject + + + + + + The index of the object. + + Returns the object stored at the given index. + + The object at the given index. + To be added. + + + + + + Method + + 1.13.0.0 + 1.14.0.0 + + + Claunia.PropertyList.NSObject[] + + + + + + System.ParamArray + + + + + + The indices of the objects. + + Returns a new array containing only the values stored at the given + indices. The values are sorted by their index. + + The new array containing the objects stored at the given indices. + To be added. + + + + + + Method + + 1.13.0.0 + 1.14.0.0 + + + System.Void + + + + + + The index of the object + + Remove the i-th element from the array. + The array will be resized. + + To be added. + + + + + + Method + + 1.13.0.0 + 1.14.0.0 + + + System.Void + + + + + + + The index where to store the object. + The object. + + Stores an object at the specified index. + If there was another object stored at that index it will be replaced. + + To be added. + + + + + + Method + + 1.13.0.0 + 1.14.0.0 + + + System.String + + + + + + Generates a valid ASCII property list which has this NSArray as its + root object. + + + The generated property list complies with the format as + described in https://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/PropertyLists/OldStylePlists/OldStylePLists.html + Property List Programming Guide - Old-Style ASCII Property Lists. + + + ASCII representation of this object. + To be added. + + + + + + Method + + 1.13.0.0 + 1.14.0.0 + + + System.String + + + + + + Generates a valid ASCII property list in GnuStep format which has this + NSArray as its root object. + + + The generated property list complies with + the format as described in http://www.gnustep.org/resources/documentation/Developer/Base/Reference/NSPropertyList.html + GnuStep - NSPropertyListSerialization class documentation. + + + GnuStep ASCII representation of this object. + To be added. + + + + diff --git a/DiscImageChef.Settings/docs/mono/Claunia.PropertyList/NSData.xml b/DiscImageChef.Settings/docs/mono/Claunia.PropertyList/NSData.xml new file mode 100644 index 00000000..9f09f95e --- /dev/null +++ b/DiscImageChef.Settings/docs/mono/Claunia.PropertyList/NSData.xml @@ -0,0 +1,260 @@ + + + + + plist-cil + 1.13.0.0 + 1.14.0.0 + + + Claunia.PropertyList.NSObject + + + + + NSData objects are wrappers for byte buffers + + To be added. + + + + + + Constructor + + 1.13.0.0 + 1.14.0.0 + + + + + + The raw data contained in the NSData object. + + Creates the NSData object from the binary representation of it. + + To be added. + + + + + + Constructor + + 1.13.0.0 + 1.14.0.0 + + + + + + The file containing the data. + + Creates a NSData object from a file. Using the files contents as the contents of this NSData object. + + To be added. + If the file could not be found. + If the file could not be read. + + + + + + Constructor + + 1.13.0.0 + 1.14.0.0 + + + + + + The Base64 encoded contents of the NSData object. + + Creates a NSData object from its textual representation, which is a Base64 encoded amount of bytes. + + To be added. + When the given string is not a proper Base64 formatted string. + + + + + + Property + + 1.13.0.0 + 1.14.0.0 + + + System.Byte[] + + + + The bytes contained in this NSData object. + + The data as bytes + To be added. + + + + + + Method + + 1.13.0.0 + 1.14.0.0 + + + System.Boolean + + + + + + The to compare with the current . + + Determines whether the specified is equal to the current . + + + true if the specified is equal to the current + ; otherwise, false. + To be added. + + + + + + Method + + 1.13.0.0 + 1.14.0.0 + + + System.Boolean + + + + + + The to compare with the current . + + Determines whether the specified is equal to the current . + + + true if the specified is equal to the current + ; otherwise, false. + To be added. + + + + + + Method + + 1.13.0.0 + 1.14.0.0 + + + System.String + + + + + Gets the Base64 encoded data contained in this NSData object. + + The Base64 encoded data as a string. + To be added. + + + + + + Method + + 1.13.0.0 + 1.14.0.0 + + + System.Void + + + + + + + The byte buffer which will contain the data + The amount of data to copy + + Loads the bytes from this NSData object into a byte buffer. + + To be added. + + + + + + Method + + 1.13.0.0 + 1.14.0.0 + + + System.Void + + + + + + + + The byte buffer which will contain the data + The start index. + The stop index. + + Loads the bytes from this NSData object into a byte buffer. + + To be added. + + + + + + Method + + 1.13.0.0 + 1.14.0.0 + + + System.Int32 + + + + + Serves as a hash function for a object. + + A hash code for this instance that is suitable for use in hashing algorithms and data structures such as a + hash table. + To be added. + + + + + + Property + + 1.13.0.0 + 1.14.0.0 + + + System.Int32 + + + + Gets the amount of data stored in this object. + + The number of bytes contained in this object. + To be added. + + + + diff --git a/DiscImageChef.Settings/docs/mono/Claunia.PropertyList/NSDate.xml b/DiscImageChef.Settings/docs/mono/Claunia.PropertyList/NSDate.xml new file mode 100644 index 00000000..b246f8b8 --- /dev/null +++ b/DiscImageChef.Settings/docs/mono/Claunia.PropertyList/NSDate.xml @@ -0,0 +1,189 @@ + + + + + plist-cil + 1.13.0.0 + 1.14.0.0 + + + Claunia.PropertyList.NSObject + + + + + Represents a date + + To be added. + + + + + + Constructor + + 1.13.0.0 + 1.14.0.0 + + + + + + bytes The date bytes + + Creates a date from its binary representation. + + To be added. + + + + + + Constructor + + 1.13.0.0 + 1.14.0.0 + + + + + + The date + + Creates a NSDate from a .NET DateTime + + To be added. + + + + + + Constructor + + 1.13.0.0 + 1.14.0.0 + + + + + + The textual representation of the date (ISO 8601 format) + + Parses a date from its textual representation. + That representation has the following pattern: yyyy-MM-dd'T'HH:mm:ss'Z' + To be added. + When the date could not be parsed, i.e. it does not match the expected pattern. + + + + + + Property + + 1.13.0.0 + 1.14.0.0 + + + System.DateTime + + + + Gets the date. + + The date. + To be added. + + + + + + Method + + 1.13.0.0 + 1.14.0.0 + + + System.Boolean + + + + + + The to compare with the current . + + Determines whether the specified is equal to the current . + + + true if the specified is equal to the current + ; otherwise, false. + To be added. + + + + + + Method + + 1.13.0.0 + 1.14.0.0 + + + System.Boolean + + + + + + The to compare with the current . + + Determines whether the specified is equal to the current . + + + true if the specified is equal to the current + ; otherwise, false. + To be added. + + + + + + Method + + 1.13.0.0 + 1.14.0.0 + + + System.Int32 + + + + + Serves as a hash function for a object. + + A hash code for this instance that is suitable for use in hashing algorithms and data structures such as a + hash table. + To be added. + + + + + + Method + + 1.13.0.0 + 1.14.0.0 + + + System.String + + + + + Generates a string representation of the date. + + A string representation of the date. + To be added. + + + + diff --git a/DiscImageChef.Settings/docs/mono/Claunia.PropertyList/NSDictionary.xml b/DiscImageChef.Settings/docs/mono/Claunia.PropertyList/NSDictionary.xml new file mode 100644 index 00000000..5914242d --- /dev/null +++ b/DiscImageChef.Settings/docs/mono/Claunia.PropertyList/NSDictionary.xml @@ -0,0 +1,916 @@ + + + + + plist-cil + 1.13.0.0 + 1.14.0.0 + + + Claunia.PropertyList.NSObject + + + + System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<System.String,Claunia.PropertyList.NSObject>> + + + System.Collections.Generic.IDictionary<System.String,Claunia.PropertyList.NSObject> + + + System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<System.String,Claunia.PropertyList.NSObject>> + + + + + + A NSDictionary is a collection of keys and values, essentially a Dictionary. + The keys are simple Strings whereas the values can be any kind of NSObject. + + + You can access the keys through the function . + + + Access to the objects stored for each key is given through the function + . + + + To be added. + + + + + + Constructor + + 1.13.0.0 + 1.14.0.0 + + + + + Creates a new empty NSDictionary. + + To be added. + + + + + + Method + + 1.13.0.0 + 1.14.0.0 + + + System.Void + + + + + + Item. + + Adds the specified item. + + To be added. + + + + + + Method + + 1.13.0.0 + 1.14.0.0 + + + System.Void + + + + + + + Key. + Value. + + Add the specified key and value. + + To be added. + + + + + + Method + + 1.13.0.0 + 1.14.0.0 + + + System.Void + + + + + + + The key. + The value. + + Puts a new key-value pair into this dictionary. + + To be added. + + + + + + Method + + 1.13.0.0 + 1.14.0.0 + + + System.Void + + + + + + + The key. + The value. + + Puts a new key-value pair into this dictionary. + + To be added. + + + + + + Method + + 1.13.0.0 + 1.14.0.0 + + + System.Void + + + + + + + The key. + The value. + + Puts a new key-value pair into this dictionary. + + To be added. + + + + + + Method + + 1.13.0.0 + 1.14.0.0 + + + System.Void + + + + + + + The key. + The value. Supported object types are numbers, byte-arrays, dates, strings and arrays or sets of those. + + Puts a new key-value pair into this dictionary. + If the value is null, no operation will be performed on the dictionary. + + To be added. + + + + + + Method + + 1.13.0.0 + 1.14.0.0 + + + System.Void + + + + + Clears this instance. + + To be added. + + + + + + Method + + 1.13.0.0 + 1.14.0.0 + + + System.Boolean + + + + + + Item. + + Checks if the current instance contains the specified item. + + + true if it is found, false otherwise. + To be added. + + + + + + Method + + 1.13.0.0 + 1.14.0.0 + + + System.Boolean + + + + + + Key. + + Checks if the specified object key is contained in the current instance. + + + true, if key is contained, false otherwise. + To be added. + + + + + + Method + + 1.13.0.0 + 1.14.0.0 + + + System.Boolean + + + + + + Key. + + Checks if there is any item contained in the current instance corresponding with the specified key. + + + true, if key was contained, false otherwise. + To be added. + + + + + + Method + + 1.13.0.0 + 1.14.0.0 + + + System.Boolean + + + + + + Key. + + Checks if there is any item contained in the current instance corresponding with the specified value. + + + true, if value is contained, false otherwise. + To be added. + + + + + + Method + + 1.13.0.0 + 1.14.0.0 + + + System.Boolean + + + + + + The value that will be searched for. + + Checks whether a given value is contained in this dictionary. + + Whether the key is contained in this dictionary. + To be added. + + + + + + Method + + 1.13.0.0 + 1.14.0.0 + + + System.Boolean + + + + + + The value that will be searched for. + + Checks whether a given value is contained in this dictionary. + + Whether the key is contained in this dictionary. + To be added. + + + + + + Method + + 1.13.0.0 + 1.14.0.0 + + + System.Boolean + + + + + + The value that will be searched for. + + Checks whether a given value is contained in this dictionary. + + Whether the key is contained in this dictionary. + To be added. + + + + + + Method + + 1.13.0.0 + 1.14.0.0 + + + System.Boolean + + + + + + The value that will be searched for. + + Checks whether a given value is contained in this dictionary. + + Whether the key is contained in this dictionary. + To be added. + + + + + + Method + + 1.13.0.0 + 1.14.0.0 + + + System.Boolean + + + + + + The value that will be searched for. + + Checks whether a given value is contained in this dictionary. + + Whether the key is contained in this dictionary. + To be added. + + + + + + Method + + 1.13.0.0 + 1.14.0.0 + + + System.Boolean + + + + + + Object to search up in the current instance. + + Checks if the current instance contains the object corresponding to the specified key. + + + true, if value is contained, false otherwise. + To be added. + + + + + + Method + + 1.13.0.0 + 1.14.0.0 + + + System.Boolean + + + + + + The value that will be searched for. + + Checks whether a given value is contained in this dictionary. + + Whether the key is contained in this dictionary. + To be added. + + + + + + Method + + 1.13.0.0 + 1.14.0.0 + + + System.Void + + + + + + + The one-dimensional that is the destination of the elements copied from . The must have zero-based indexing. + The zero-based index in array at which copying begins. + + Copies the elements to an existing one-dimensional , starting at the specified array index. + + To be added. + + + + + + Property + + 1.13.0.0 + 1.14.0.0 + + + System.Int32 + + + + Gets the count of items in the current instance. + + How many items are contained in the current instance. + To be added. + + + + + + Method + + 1.13.0.0 + 1.14.0.0 + + + System.Boolean + + + + + + The to compare with the current . + + Determines whether the specified is equal to the current . + + + true if the specified is equal to the current + ; otherwise, false. + To be added. + + + + + + Method + + 1.13.0.0 + 1.14.0.0 + + + Claunia.PropertyList.NSObject + + + + + + Key. + + Gets the corresponding to the specified key from the current instance. + + The object corresponding to the specified key, null if not found in the current instance. + To be added. + + + + + + Method + + 1.13.0.0 + 1.14.0.0 + + + System.Collections.Generic.Dictionary<System.String,Claunia.PropertyList.NSObject> + + + + + Gets the hashmap which stores the keys and values of this dictionary. + Changes to the hashmap's contents are directly reflected in this + dictionary. + + The hashmap which is used by this dictionary to store its contents. + To be added. + + + + + + Method + + 1.13.0.0 + 1.14.0.0 + + + System.Collections.Generic.IEnumerator<System.Collections.Generic.KeyValuePair<System.String,Claunia.PropertyList.NSObject>> + + + + + Gets the enumerator. + + The enumerator. + To be added. + + + + + + Method + + 1.13.0.0 + 1.14.0.0 + + + System.Int32 + + + + + Serves as a hash function for a object. + + A hash code for this instance that is suitable for use in hashing algorithms and data structures such as a + hash table. + To be added. + + + + + + Property + + 1.13.0.0 + 1.14.0.0 + + + System.Boolean + + + + Gets a value indicating whether this instance is empty. + + + true if this instance is empty; otherwise, false. + To be added. + + + + + + Property + + 1.13.0.0 + 1.14.0.0 + + + System.Boolean + + + + Gets a value indicating whether this instance is read only. + + + true if this instance is read only; otherwise, false. + To be added. + + + + + + Property + + 1.13.0.0 + 1.14.0.0 + + + Claunia.PropertyList.NSObject + + + + + + Index. + + Gets or sets the at the specified index. + + To be added. + To be added. + + + + + + Property + + 1.13.0.0 + 1.14.0.0 + + + System.Collections.Generic.ICollection<System.String> + + + + Gets an array with all the keys contained in the current instance. + + The keys. + To be added. + + + + + + Method + + 1.13.0.0 + 1.14.0.0 + + + Claunia.PropertyList.NSObject + + + + + + The key. + + Gets the NSObject stored for the given key. + + The object. + To be added. + + + + + + Method + + 1.13.0.0 + 1.14.0.0 + + + System.Boolean + + + + + + Item to remove. + + Removes the specified item. + + + true if successfully removed, false if not, or if item is not in current instance. + To be added. + + + + + + Method + + 1.13.0.0 + 1.14.0.0 + + + System.Boolean + + + + + + Key. + + Removes the item corresponding to the specified key from the current instance, if found. + + + true, if removed, false otherwise. + To be added. + + + + + + Method + + 1.13.0.0 + 1.14.0.0 + + + System.Boolean + + + + + + Key. + + Removes the item belonging to the specified key. + + To be added. + To be added. + + + + + + Method + + 1.13.0.0 + 1.14.0.0 + + + System.Collections.IEnumerator + + + + To be added. + To be added. + To be added. + + + + + + Method + + 1.13.0.0 + 1.14.0.0 + + + System.String + + + + + Generates a valid ASCII property list which has this NSDictionary as its + root object. The generated property list complies with the format as + described in https://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/PropertyLists/OldStylePlists/OldStylePLists.html + Property List Programming Guide - Old-Style ASCII Property Lists. + + ASCII representation of this object. + To be added. + + + + + + Method + + 1.13.0.0 + 1.14.0.0 + + + System.String + + + + + Generates a valid ASCII property list in GnuStep format which has this + NSDictionary as its root object. The generated property list complies with + the format as described in http://www.gnustep.org/resources/documentation/Developer/Base/Reference/NSPropertyList.html + GnuStep - NSPropertyListSerialization class documentation. + + GnuStep ASCII representation of this object. + To be added. + + + + + + Method + + 1.13.0.0 + 1.14.0.0 + + + System.Boolean + + + + + + + Key. + Where to store the value. + + Tries to get the item corresponding to the specified key + + + true, if get value was successfully found and retrieved, false otherwise. + To be added. + + + + + + Property + + 1.13.0.0 + 1.14.0.0 + + + System.Collections.Generic.ICollection<Claunia.PropertyList.NSObject> + + + + Gets an array with all the objects contained in the current instance. + + The objects. + To be added. + + + + diff --git a/DiscImageChef.Settings/docs/mono/Claunia.PropertyList/NSNumber.xml b/DiscImageChef.Settings/docs/mono/Claunia.PropertyList/NSNumber.xml new file mode 100644 index 00000000..5570a43d --- /dev/null +++ b/DiscImageChef.Settings/docs/mono/Claunia.PropertyList/NSNumber.xml @@ -0,0 +1,507 @@ + + + + + plist-cil + 1.13.0.0 + 1.14.0.0 + + + Claunia.PropertyList.NSObject + + + + System.IComparable + + + + + A number whose value is either an integer, a real number or bool. + + To be added. + + + + + + Constructor + + 1.13.0.0 + 1.14.0.0 + + + + + + The bool value. + + Creates a bool number. + + To be added. + + + + + + Constructor + + 1.13.0.0 + 1.14.0.0 + + + + + + The real value. + + Creates a real number. + + To be added. + + + + + + Constructor + + 1.13.0.0 + 1.14.0.0 + + + + + + The integer value. + + Creates an integer number. + + To be added. + + + + + + Constructor + + 1.13.0.0 + 1.14.0.0 + + + + + + The long integer value. + + Creates an integer number. + + To be added. + + + + + + Constructor + + 1.13.0.0 + 1.14.0.0 + + + + + + The textual representation of the number. + + Creates a number from its textual representation. + + To be added. + + + + + + + + + Constructor + + 1.13.0.0 + 1.14.0.0 + + + + + + + The binary representation + The type of number + + Parses integers and real numbers from their binary representation. + Note: real numbers are not yet supported. + To be added. + + + + + + + + Field + + 1.13.0.0 + 1.14.0.0 + + + System.Int32 + + 2 + + + Indicates that the number's value is bool. + + To be added. + + + + + + Method + + 1.13.0.0 + 1.14.0.0 + + + System.Int32 + + + + + + Object to compare to the current . + + Compares the current to the specified object. + + 0 if the numbers are equal, 1 if the current is greater + than the argument and -1 if it is less, or the argument is not a number. + To be added. + + + + + + Method + + 1.13.0.0 + 1.14.0.0 + + + System.Boolean + + + + + + The to compare with the current . + + Determines whether the specified is equal to the current . + + + true if the specified is equal to the current + ; otherwise, false. + To be added. + + + + + + Method + + 1.13.0.0 + 1.14.0.0 + + + System.Boolean + + + + + + The object to compare to. + + Checks whether the other object is a NSNumber of the same value. + + Whether the objects are equal in terms of numeric value and type. + To be added. + + + + + + Method + + 1.13.0.0 + 1.14.0.0 + + + System.Single + + + + + The number's float value. + WARNING: Possible loss of precision if the value is outside the float range. + + The value of the number as float. + To be added. + + + + + + Method + + 1.13.0.0 + 1.14.0.0 + + + System.Int32 + + + + + Serves as a hash function for a object. + + A hash code for this instance that is suitable for use in hashing algorithms and data structures such as a + hash table. + To be added. + + + + + + Method + + 1.13.0.0 + 1.14.0.0 + + + System.Int32 + + + + + Gets the type of this number's value. + + The type flag. + To be added. + + + + + + + + + Field + + 1.13.0.0 + 1.14.0.0 + + + System.Int32 + + 0 + + + Indicates that the number's value is an integer. + The number is stored as a .NET . + Its original value could have been char, short, int, long or even long long. + + To be added. + + + + + + Method + + 1.13.0.0 + 1.14.0.0 + + + System.Boolean + + + + + Checks whether the value of this NSNumber is a bool. + + Whether the number's value is a bool. + To be added. + + + + + + Method + + 1.13.0.0 + 1.14.0.0 + + + System.Boolean + + + + + Checks whether the value of this NSNumber is an integer. + + Whether the number's value is an integer. + To be added. + + + + + + Method + + 1.13.0.0 + 1.14.0.0 + + + System.Boolean + + + + + Checks whether the value of this NSNumber is a real number. + + Whether the number's value is a real number. + To be added. + + + + + + Field + + 1.13.0.0 + 1.14.0.0 + + + System.Int32 + + 1 + + + Indicates that the number's value is a real number. + The number is stored as a .NET . + Its original value could have been float or double. + + To be added. + + + + + + Method + + 1.13.0.0 + 1.14.0.0 + + + System.Boolean + + + + + The number's bool value. + + + true if the value is true or non-zero, false otherwise. + To be added. + + + + + + Method + + 1.13.0.0 + 1.14.0.0 + + + System.Double + + + + + The number's double value. + + The value of the number as double. + To be added. + + + + + + Method + + 1.13.0.0 + 1.14.0.0 + + + System.Int32 + + + + + The number's int value. + Note: Even though the number's type might be INTEGER it can be larger than a Java int. + Use intValue() only if you are certain that it contains a number from the int range. + Otherwise the value might be innaccurate. + The value of the number as int. + To be added. + + + + + + Method + + 1.13.0.0 + 1.14.0.0 + + + System.Int64 + + + + + The number's long value. + + The value of the number as long + To be added. + + + + + + Method + + 1.13.0.0 + 1.14.0.0 + + + System.String + + + + + Returns a that represents the current . + + A that represents the current . + To be added. + + + + diff --git a/DiscImageChef.Settings/docs/mono/Claunia.PropertyList/NSObject.xml b/DiscImageChef.Settings/docs/mono/Claunia.PropertyList/NSObject.xml new file mode 100644 index 00000000..d00aa7a1 --- /dev/null +++ b/DiscImageChef.Settings/docs/mono/Claunia.PropertyList/NSObject.xml @@ -0,0 +1,339 @@ + + + + + plist-cil + 1.13.0.0 + 1.14.0.0 + + + System.Object + + + + + + Abstract interface for any object contained in a property list. + + + The names and functions of the various objects orient themselves + towards Apple's Cocoa API. + + + To be added. + + + + + + Constructor + + 1.13.0.0 + 1.14.0.0 + + + + To be added. + To be added. + + + + + + Method + + 1.13.0.0 + 1.14.0.0 + + + System.Boolean + + + + + + The to compare with the current . + + Determines if the specific NSObject is the same as the NSObject overriding this method. + + + true if the specified is equal to the current + ; otherwise, false. + To be added. + + + + + + Method + + 1.13.0.0 + 1.14.0.0 + + + System.Object + + + + + Converts this NSObject into an equivalent object + of the .NET Runtime Environment. + objects are converted to arrays. objects are converted to objects extending the class. objects are converted to objects extending the class. objects are converted to primitive number values (, , or ). objects are converted to objects. objects are converted to arrays. objects are converted to objects. objects are converted to arrays. + A native .NET object representing this NSObject's value. + To be added. + + + + + + Method + + 1.13.0.0 + 1.14.0.0 + + + System.String + + + + + Generates a valid XML property list including headers using this object as root. + + The XML representation of the property list including XML header and doctype information. + To be added. + + + + + + Method + + 1.13.0.0 + 1.14.0.0 + + + Claunia.PropertyList.NSNumber + + + + + + The value to represent as a NSObject. + + Wraps the given value inside a NSObject. + + A NSObject representing the given value. + To be added. + + + + + + Method + + 1.13.0.0 + 1.14.0.0 + + + Claunia.PropertyList.NSData + + + + + + The value to represent as a NSObject. + + Wraps the given value inside a NSObject. + + A NSObject representing the given value. + To be added. + + + + + + Method + + 1.13.0.0 + 1.14.0.0 + + + Claunia.PropertyList.NSDictionary + + + + + + The value to represent as a NSObject. + + Creates a NSDictionary with the contents of the given map. + + A NSObject representing the given value. + To be added. + When one of the values contained in the map cannot be represented by a NSObject. + + + + + + Method + + 1.13.0.0 + 1.14.0.0 + + + Claunia.PropertyList.NSSet + + + + + + The value to represent as a NSObject. + + Creates a NSSet with the contents of this set. + + A NSObject representing the given value. + To be added. + When one of the values contained in the map cannot be represented by a NSObject. + + + + + + Method + + 1.13.0.0 + 1.14.0.0 + + + Claunia.PropertyList.NSNumber + + + + + + The value to represent as a NSObject. + + Wraps the given value inside a NSObject. + + A NSObject representing the given value. + To be added. + + + + + + Method + + 1.13.0.0 + 1.14.0.0 + + + Claunia.PropertyList.NSNumber + + + + + + The value to represent as a NSObject. + + Wraps the given value inside a NSObject. + + A NSObject representing the given value. + To be added. + + + + + + Method + + 1.13.0.0 + 1.14.0.0 + + + Claunia.PropertyList.NSObject + + + + + + The object to represent. + + + Creates a NSObject representing the given .NET Object. + + + Numerics of type , , , , , or are wrapped as NSNumber objects. + + + Strings are wrapped as objects and byte arrays as objects. + + + DateTime objects are wrapped as objects. + + + Serializable classes are serialized and their data is stored in objects. + + + Arrays and Collection objects are converted to where each array member is wrapped into a . + + + Dictionaries are converted to . Each key is converted to a string and each value wrapped into a . + + + A NSObject equivalent to the given object. + To be added. + + + + + + Method + + 1.13.0.0 + 1.14.0.0 + + + Claunia.PropertyList.NSArray + + + + + + The value to represent as a NSObject. + + Creates a NSArray with the contents of the given array. + + A NSObject representing the given value. + To be added. + When one of the objects contained in the array cannot be represented by a NSObject. + + + + + + Method + + 1.13.0.0 + 1.14.0.0 + + + Claunia.PropertyList.NSData + + + + + + The object to serialize and wrap. + + Serializes the given object using Java's default object serialization + and wraps the serialized object in a NSData object. + + A NSData object + To be added. + When the object could not be serialized. + + + + diff --git a/DiscImageChef.Settings/docs/mono/Claunia.PropertyList/NSSet.xml b/DiscImageChef.Settings/docs/mono/Claunia.PropertyList/NSSet.xml new file mode 100644 index 00000000..6c843a77 --- /dev/null +++ b/DiscImageChef.Settings/docs/mono/Claunia.PropertyList/NSSet.xml @@ -0,0 +1,411 @@ + + + + + plist-cil + 1.13.0.0 + 1.14.0.0 + + + Claunia.PropertyList.NSObject + + + + System.Collections.IEnumerable + + + + + + A set is an interface to an unordered collection of objects. + + + This implementation uses a as the underlying + data structure. + + + To be added. + + + + + + Constructor + + 1.13.0.0 + 1.14.0.0 + + + + + Creates an empty unordered set. + + To be added. + + + + + + Constructor + + 1.13.0.0 + 1.14.0.0 + + + + + + System.ParamArray + + + + + + The objects to populate the set. + + Creates a set and fill it with the given objects. + + To be added. + + + + + + Constructor + + 1.13.0.0 + 1.14.0.0 + + + + + + Should the set be ordered on operations? + + Creates an empty set. + + To be added. + + + + + + Constructor + + 1.13.0.0 + 1.14.0.0 + + + + + + + System.ParamArray + + + + + + Should the set be ordered on operations? + The objects to populate the set. + + Creates a set and fill it with the given objects. + + To be added. + + + + + + Method + + 1.13.0.0 + 1.14.0.0 + + + System.Void + + + + + + The object to add. + + Adds an object to the set. + + To be added. + + + + + + Method + + 1.13.0.0 + 1.14.0.0 + + + Claunia.PropertyList.NSObject[] + + + + + Returns all objects contained in the set. + + An array of all objects in the set. + To be added. + + + + + + Method + + 1.13.0.0 + 1.14.0.0 + + + Claunia.PropertyList.NSObject + + + + + Returns one of the objects in the set, or null + if the set contains no objects. + + The first object in the set, or null if the set is empty. + To be added. + + + + + + Method + + 1.13.0.0 + 1.14.0.0 + + + System.Boolean + + + + + + The object to look for. + + Finds out whether a given object is contained in the set. + + + true, when the object was found, false otherwise. + To be added. + + + + + + Property + + 1.13.0.0 + 1.14.0.0 + + + System.Int32 + + + + Gets the number of elements in the set. + + The number of elements in the set. + To be added. + + + + + + Method + + 1.13.0.0 + 1.14.0.0 + + + System.Boolean + + + + + + The to compare with the current . + + Determines whether the specified is equal to the current . + + + true if the specified is equal to the current + ; otherwise, false. + To be added. + + + + + + Method + + 1.13.0.0 + 1.14.0.0 + + + System.Boolean + + + + + + The to compare with the current . + + Determines whether the specified is equal to the current . + + + true if the specified is equal to the current + ; otherwise, false. + To be added. + + + + + + Method + + 1.13.0.0 + 1.14.0.0 + + + System.Collections.IEnumerator + + + + + Returns an enumerator object that lets you iterate over all elements of the set. + This is the equivalent to objectEnumerator in the Cocoa implementation + of NSSet. + + The iterator for the set. + To be added. + + + + + + Method + + 1.13.0.0 + 1.14.0.0 + + + System.Int32 + + + + + Serves as a hash function for a object. + + A hash code for this instance that is suitable for use in hashing algorithms and data structures such as a + hash table. + To be added. + + + + + + Method + + 1.13.0.0 + 1.14.0.0 + + + System.Boolean + + + + + + The other set. + + Finds out whether at least one object is present in both sets. + + + true if the intersection of both sets is empty, false otherwise. + To be added. + + + + + + Method + + 1.13.0.0 + 1.14.0.0 + + + System.Boolean + + + + + + The other set. + + Finds out if this set is a subset of the given set. + + + true if all elements in this set are also present in the other set, falseotherwise. + To be added. + + + + + + Method + + 1.13.0.0 + 1.14.0.0 + + + Claunia.PropertyList.NSObject + + + + + + The object to look for. + + Determines whether the set contains an object equal to a given object + and returns that object if it is present. + + The object if it is present, null otherwise. + To be added. + + + + + + Method + + 1.13.0.0 + 1.14.0.0 + + + System.Void + + + + + + The object to remove. + + Removes an object from the set. + + To be added. + + + + diff --git a/DiscImageChef.Settings/docs/mono/Claunia.PropertyList/NSString.xml b/DiscImageChef.Settings/docs/mono/Claunia.PropertyList/NSString.xml new file mode 100644 index 00000000..76c55cce --- /dev/null +++ b/DiscImageChef.Settings/docs/mono/Claunia.PropertyList/NSString.xml @@ -0,0 +1,310 @@ + + + + + plist-cil + 1.13.0.0 + 1.14.0.0 + + + Claunia.PropertyList.NSObject + + + + System.IComparable + + + + + A NSString contains a string. + + To be added. + + + + + + Constructor + + 1.13.0.0 + 1.14.0.0 + + + + + + The string that will be contained in the NSString. + + Creates a NSString from a string. + + To be added. + + + + + + Constructor + + 1.13.0.0 + 1.14.0.0 + + + + + + + The binary representation. + The encoding of the binary representation, the name of a supported charset. + + Creates a NSString from its binary representation. + + To be added. + The encoding charset is invalid or not supported by the underlying platform. + + + + + + Method + + 1.13.0.0 + 1.14.0.0 + + + System.Void + + + + + + The string to append. + + Appends a string to this string. + + To be added. + + + + + + Method + + 1.13.0.0 + 1.14.0.0 + + + System.Void + + + + + + The string to append. + + Appends a string to this string. + + To be added. + + + + + + Method + + 1.13.0.0 + 1.14.0.0 + + + System.Int32 + + + + + + Object to compare to the current . + + Compares the current to the specified object. + + A 32-bit signed integer that indicates the lexical relationship between the two comparands. + To be added. + + + + + + Method + + 1.13.0.0 + 1.14.0.0 + + + System.Boolean + + + + + + The to compare with the current . + + Determines whether the specified is equal to the current . + + + true if the specified is equal to the current + ; otherwise, false. + To be added. + + + + + + Method + + 1.13.0.0 + 1.14.0.0 + + + System.Boolean + + + + + + The to compare with the current . + + Determines whether the specified is equal to the current . + + + true if the specified is equal to the current + ; otherwise, false. + To be added. + + + + + + Method + + 1.13.0.0 + 1.14.0.0 + + + System.String + + + + + Gets this strings content. + + This NSString as .NET string object. + To be added. + + + + + + Method + + 1.13.0.0 + 1.14.0.0 + + + System.Int32 + + + + + Serves as a hash function for a object. + + A hash code for this instance that is suitable for use in hashing algorithms and data structures such as a + hash table. + To be added. + + + + + + Method + + 1.13.0.0 + 1.14.0.0 + + + System.Void + + + + + + The string to prepend. + + Prepends a string to this string. + + To be added. + + + + + + Method + + 1.13.0.0 + 1.14.0.0 + + + System.Void + + + + + + The string to prepend. + + Prepends a string to this string. + + To be added. + + + + + + Method + + 1.13.0.0 + 1.14.0.0 + + + System.Void + + + + + + The new content of this string object. + + Sets the contents of this string. + + To be added. + + + + + + Method + + 1.13.0.0 + 1.14.0.0 + + + System.String + + + + + The textual representation of this NSString. + + The NSString's contents. + To be added. + + + + diff --git a/DiscImageChef.Settings/docs/mono/Claunia.PropertyList/PropertyListFormatException.xml b/DiscImageChef.Settings/docs/mono/Claunia.PropertyList/PropertyListFormatException.xml new file mode 100644 index 00000000..0f64bebb --- /dev/null +++ b/DiscImageChef.Settings/docs/mono/Claunia.PropertyList/PropertyListFormatException.xml @@ -0,0 +1,41 @@ + + + + + plist-cil + 1.13.0.0 + 1.14.0.0 + + + System.Exception + + + + + A PropertyListFormatException is thrown by the various property list format parsers + when an error in the format of the given property list is encountered. + + To be added. + + + + + + Constructor + + 1.13.0.0 + 1.14.0.0 + + + + + + A message containing information about the nature of the exception. + + Creates a new exception with the given message. + + To be added. + + + + diff --git a/DiscImageChef.Settings/docs/mono/Claunia.PropertyList/PropertyListParser.xml b/DiscImageChef.Settings/docs/mono/Claunia.PropertyList/PropertyListParser.xml new file mode 100644 index 00000000..dd7ece77 --- /dev/null +++ b/DiscImageChef.Settings/docs/mono/Claunia.PropertyList/PropertyListParser.xml @@ -0,0 +1,411 @@ + + + + + plist-cil + 1.13.0.0 + 1.14.0.0 + + + System.Object + + + + + This class provides methods to parse property lists. It can handle files, + input streams and byte arrays. All known property list formats are supported. + This class also provides methods to save and convert property lists. + + To be added. + + + + + + Method + + 1.13.0.0 + 1.14.0.0 + + + System.Void + + + + + + + The source file. + The target file. + + Converts a given property list file into ASCII format. + + To be added. + + + + + + Method + + 1.13.0.0 + 1.14.0.0 + + + System.Void + + + + + + + The source file. + The target file. + + Converts a given property list file into the OS X and iOS binary format. + + To be added. + + + + + + Method + + 1.13.0.0 + 1.14.0.0 + + + System.Void + + + + + + + The source file. + The target file. + + Converts a given property list file into GnuStep ASCII format. + + To be added. + + + + + + Method + + 1.13.0.0 + 1.14.0.0 + + + System.Void + + + + + + + The source file. + The target file. + + Converts a given property list file into the OS X and iOS XML format. + + To be added. + + + + + + Method + + 1.13.0.0 + 1.14.0.0 + + + Claunia.PropertyList.NSObject + + + + + + The property list data as a byte array. + + Parses a property list from a byte array. + + The root object in the property list. This is usually a NSDictionary but can also be a NSArray. + To be added. + + + + + + Method + + 1.13.0.0 + 1.14.0.0 + + + Claunia.PropertyList.NSObject + + + + + + The property list file. + + Parses a property list from a file. + + The root object in the property list. This is usually a NSDictionary but can also be a NSArray. + To be added. + + + + + + Method + + 1.13.0.0 + 1.14.0.0 + + + Claunia.PropertyList.NSObject + + + + + + The Stream delivering the property list data. + + Parses a property list from an Stream. + + The root object of the property list. This is usually a NSDictionary but can also be a NSArray. + To be added. + + + + + + Method + + 1.13.0.0 + 1.14.0.0 + + + Claunia.PropertyList.NSObject + + + + + + Path to the property list file. + + Parses a property list from a file. + + The root object in the property list. This is usually a NSDictionary but can also be a NSArray. + To be added. + + + + + + Method + + 1.13.0.0 + 1.14.0.0 + + + System.Void + + + + + + + The root object. + The output file. + + Saves a property list with the given object as root into a ASCII file. + + To be added. + When an error occurs during the writing process. + + + + + + Method + + 1.13.0.0 + 1.14.0.0 + + + System.Void + + + + + + + The root object. + The output file. + + Saves a property list with the given object as root into a ASCII file. + + To be added. + When an error occurs during the writing process. + + + + + + Method + + 1.13.0.0 + 1.14.0.0 + + + System.Void + + + + + + + The root object. + The output file. + + Saves a property list with the given object as root into a binary file. + + To be added. + When an error occurs during the writing process. + + + + + + Method + + 1.13.0.0 + 1.14.0.0 + + + System.Void + + + + + + + The root object. + The output stream. + + Saves a property list with the given object as root in binary format into an output stream. + + To be added. + When an error occurs during the writing process. + + + + + + Method + + 1.13.0.0 + 1.14.0.0 + + + System.Void + + + + + + + The root object. + The output file. + + Saves a property list with the given object as root into a GnuStep ASCII file. + + To be added. + When an error occurs during the writing process. + + + + + + Method + + 1.13.0.0 + 1.14.0.0 + + + System.Void + + + + + + + The root object. + The output file. + + Saves a property list with the given object as root into a GnuStep ASCII file. + + To be added. + When an error occurs during the writing process. + + + + + + Method + + 1.13.0.0 + 1.14.0.0 + + + System.Void + + + + + + + The root object. + The output file. + + Saves a property list with the given object as root into a XML file. + + To be added. + When an error occurs during the writing process. + + + + + + Method + + 1.13.0.0 + 1.14.0.0 + + + System.Void + + + + + + + The root object. + The output stream. + + Saves a property list with the given object as root in XML format into an output stream. + + To be added. + When an error occurs during the writing process. + + + + diff --git a/DiscImageChef.Settings/docs/mono/Claunia.PropertyList/UID.xml b/DiscImageChef.Settings/docs/mono/Claunia.PropertyList/UID.xml new file mode 100644 index 00000000..d6b7abf3 --- /dev/null +++ b/DiscImageChef.Settings/docs/mono/Claunia.PropertyList/UID.xml @@ -0,0 +1,105 @@ + + + + + plist-cil + 1.13.0.0 + 1.14.0.0 + + + Claunia.PropertyList.NSObject + + + + + An UID. Only found in binary property lists that are keyed archives. + + To be added. + + + + + + Constructor + + 1.13.0.0 + 1.14.0.0 + + + + + + + Name. + Bytes. + + Initializes a new instance of the class. + + To be added. + + + + + + Property + + 1.13.0.0 + 1.14.0.0 + + + System.Byte[] + + + + Gets the bytes. + + The bytes. + To be added. + + + + + + Method + + 1.13.0.0 + 1.14.0.0 + + + System.Boolean + + + + + + The to compare with the current . + + Determines whether the specified is equal to the current . + + + true if the specified is equal to the current + ; otherwise, false. + To be added. + + + + + + Property + + 1.13.0.0 + 1.14.0.0 + + + System.String + + + + Gets the name. + + The name. + To be added. + + + + diff --git a/DiscImageChef.Settings/docs/mono/Claunia.PropertyList/XmlPropertyListParser.xml b/DiscImageChef.Settings/docs/mono/Claunia.PropertyList/XmlPropertyListParser.xml new file mode 100644 index 00000000..7b23256d --- /dev/null +++ b/DiscImageChef.Settings/docs/mono/Claunia.PropertyList/XmlPropertyListParser.xml @@ -0,0 +1,90 @@ + + + + + plist-cil + 1.13.0.0 + 1.14.0.0 + + + System.Object + + + + + Parses XML property lists. + + To be added. + + + + + + Method + + 1.13.0.0 + 1.14.0.0 + + + Claunia.PropertyList.NSObject + + + + + + The byte array containing the property list's data. + + Parses a XML property list from a byte array. + + The root object of the property list. This is usually a NSDictionary but can also be a NSArray. + To be added. + + + + + + Method + + 1.13.0.0 + 1.14.0.0 + + + Claunia.PropertyList.NSObject + + + + + + The XML property list file. + + Parses a XML property list file. + + The root object of the property list. This is usually a NSDictionary but can also be a NSArray. + To be added. + + + + + + Method + + 1.13.0.0 + 1.14.0.0 + + + Claunia.PropertyList.NSObject + + + + + + The input stream pointing to the property list's data. + + Parses a XML property list from an input stream. + + The root object of the property list. This is usually a NSDictionary but can also be a NSArray. + To be added. + + + + diff --git a/DiscImageChef.Settings/docs/mono/index.xml b/DiscImageChef.Settings/docs/mono/index.xml new file mode 100644 index 00000000..ca43462a --- /dev/null +++ b/DiscImageChef.Settings/docs/mono/index.xml @@ -0,0 +1,54 @@ + + + + + + System.Reflection.AssemblyCompany("Claunia.com") + + + System.Reflection.AssemblyConfiguration("") + + + System.Reflection.AssemblyCopyright("© Claunia.com") + + + System.Reflection.AssemblyDescription("") + + + System.Reflection.AssemblyProduct("") + + + System.Reflection.AssemblyTitle("plist-cil") + + + System.Reflection.AssemblyTrademark("") + + + System.Runtime.CompilerServices.RuntimeCompatibility(WrapNonExceptionThrows=true) + + + + + To be added. + To be added. + + + + + + + + + + + + + + + + + + + + plist-cil + diff --git a/DiscImageChef.Settings/docs/mono/ns-Claunia.PropertyList.xml b/DiscImageChef.Settings/docs/mono/ns-Claunia.PropertyList.xml new file mode 100644 index 00000000..2306997b --- /dev/null +++ b/DiscImageChef.Settings/docs/mono/ns-Claunia.PropertyList.xml @@ -0,0 +1,6 @@ + + + To be added. + To be added. + + diff --git a/DiscImageChef.Settings/packages.config b/DiscImageChef.Settings/packages.config new file mode 100644 index 00000000..2164a694 --- /dev/null +++ b/DiscImageChef.Settings/packages.config @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/DiscImageChef.sln b/DiscImageChef.sln index 72cbcdc4..6ddb729f 100644 --- a/DiscImageChef.sln +++ b/DiscImageChef.sln @@ -29,6 +29,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DiscImageChef.Console", "Di EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DiscImageChef.Metadata", "DiscImageChef.Metadata\DiscImageChef.Metadata.csproj", "{9F213318-5CB8-4066-A757-074489C9F818}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DiscImageChef.Settings", "DiscImageChef.Settings\DiscImageChef.Settings.csproj", "{5C4C7BAA-CF60-4233-84ED-39CB2312AF38}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|x86 = Debug|x86 @@ -89,12 +91,42 @@ Global {F8BDF57B-1571-4CD0-84B3-B422088D359A}.Debug|x86.Build.0 = Debug|Any CPU {F8BDF57B-1571-4CD0-84B3-B422088D359A}.Release|x86.ActiveCfg = Release|Any CPU {F8BDF57B-1571-4CD0-84B3-B422088D359A}.Release|x86.Build.0 = Release|Any CPU + {5C4C7BAA-CF60-4233-84ED-39CB2312AF38}.Debug|x86.ActiveCfg = Debug|Any CPU + {5C4C7BAA-CF60-4233-84ED-39CB2312AF38}.Debug|x86.Build.0 = Debug|Any CPU + {5C4C7BAA-CF60-4233-84ED-39CB2312AF38}.Release|x86.ActiveCfg = Release|Any CPU + {5C4C7BAA-CF60-4233-84ED-39CB2312AF38}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(MonoDevelopProperties) = preSolution Policies = $0 $0.StandardHeader = $1 $1.Text = @/***************************************************************************\nThe Disc Image Chef\n----------------------------------------------------------------------------\n \nFilename : ${FileName}\nVersion : 1.0\nAuthor(s) : ${AuthorName}\n \nComponent : Component\n\nRevision : $Revision$\nLast change by : $Author$\nDate : $Date$\n \n--[ Description ] ----------------------------------------------------------\n \nDescription\n \n--[ License ] --------------------------------------------------------------\n \n This program is free software: you can redistribute it and/or modify\n it under the terms of the GNU General Public License as\n published by the Free Software Foundation, either version 3 of the\n License, or (at your option) any later version.\n\n This program is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n GNU General Public License for more details.\n\n You should have received a copy of the GNU General Public License\n along with this program. If not, see .\n\n----------------------------------------------------------------------------\nCopyright (C) 2011-2015 Claunia.com\n****************************************************************************/\n//$Id$ $1.IncludeInNewFiles = True + $0.TextStylePolicy = $2 + $2.inheritsSet = VisualStudio + $2.inheritsScope = text/plain + $2.scope = text/x-csharp + $0.CSharpFormattingPolicy = $3 + $3.SpacingAfterMethodDeclarationName = False + $3.SpaceAfterMethodCallName = False + $3.inheritsSet = Mono + $3.inheritsScope = text/x-csharp + $3.scope = text/x-csharp + $3.NewLinesForBracesInProperties = True + $3.NewLinesForBracesInAccessors = True + $3.NewLinesForBracesInAnonymousMethods = True + $3.NewLinesForBracesInControlBlocks = True + $3.NewLinesForBracesInAnonymousTypes = True + $3.NewLinesForBracesInObjectCollectionArrayInitializers = True + $3.NewLinesForBracesInLambdaExpressionBody = True + $3.NewLineForElse = True + $3.NewLineForCatch = True + $3.NewLineForFinally = True + $3.SpaceBeforeOpenSquareBracket = False + $3.IndentBraces = True + $3.IndentSwitchSection = True + $3.NewLineForMembersInObjectInit = True + $3.NewLineForMembersInAnonymousTypes = True + $3.NewLineForClausesInQuery = True description = The Disc Image Chef. version = 2.2 EndGlobalSection diff --git a/DiscImageChef/ChangeLog b/DiscImageChef/ChangeLog index ae90c9d1..0c045d81 100644 --- a/DiscImageChef/ChangeLog +++ b/DiscImageChef/ChangeLog @@ -1,3 +1,71 @@ +2016-02-03 Natalia Portillo + + * Commands/Configure.cs: + Added support for settings. + + * Core/Statistics.cs: + * Commands/Verify.cs: + * Commands/Entropy.cs: + * Commands/Formats.cs: + * Commands/PrintHex.cs: + * Commands/MediaInfo.cs: + * Commands/Statistics.cs: + Added statistics. + + + * Commands/Decode.cs: + * Commands/Analyze.cs: + * Commands/Compare.cs: + * Commands/Checksum.cs: + * Commands/Benchmark.cs: + * Commands/DeviceInfo.cs: + * Commands/CreateSidecar.cs: + Added statistics. + + * Commands/DeviceReport.cs: + Added statistics. + Correct handling empty inquiry string fields. + Suppose it is not removable, til proved wrong. + Corrected MODE SENSE (6/10) detection and calling order. + If device is MMC type but reports neither mode page 2Ah + neither GET CONFIGURATION, try all CDs (old drives work like + that). + Try reading Lead-In and Lead-Out in Audio CD using Audio READ + CD commands. + Corrected READ LONG information handling, some drives return + 2s-complement in 32 bit. Upper 16 bits are ignored. + Added support for DVD raw block (37856 bytes). + Check READ LONG up to 36 times the cooked block size. That + should be enough to detect huge blocked media (like DVD and + BD) without taking ages. + If READ LONG size had to be bruteforced, and debug is + activated, save the result. + + + * Commands/DumpMedia.cs: + Added statistics. + Corrected READ LONG information handling, some drives return + 2s-complement in 32 bit. Upper 16 bits are ignored. + Start trying with 64 blocks at a time. Some drives report to + be able to read 255 at a time, but they really don't, they + take a lot longer to read. + + * Commands/MediaScan.cs: + Added statistics. + Start trying with 64 blocks at a time. Some drives report to + be able to read 255 at a time, but they really don't, they + take a lot longer to read. + + * DiscImageChef.csproj: + Added support for settings. + Added statistics. + + + * Main.cs: + * Options.cs: + Added support for settings. + Added statistics. + 2016-01-16 Natalia Portillo * Commands/Decode.cs: diff --git a/DiscImageChef/Commands/Analyze.cs b/DiscImageChef/Commands/Analyze.cs index 821fef5f..df1d8409 100644 --- a/DiscImageChef/Commands/Analyze.cs +++ b/DiscImageChef/Commands/Analyze.cs @@ -99,6 +99,9 @@ namespace DiscImageChef.Commands DicConsole.DebugWriteLine("Analyze command", "Image without headers is {0} bytes.", _imageFormat.GetImageSize()); DicConsole.DebugWriteLine("Analyze command", "Image has {0} sectors.", _imageFormat.GetSectors()); DicConsole.DebugWriteLine("Analyze command", "Image identifies disk type as {0}.", _imageFormat.GetMediaType()); + + Core.Statistics.AddMediaFormat(_imageFormat.GetImageFormat()); + Core.Statistics.AddMedia(_imageFormat.ImageInfo.mediaType, false); } catch (Exception ex) { @@ -116,11 +119,11 @@ namespace DiscImageChef.Commands foreach (PartPlugin _partplugin in plugins.PartPluginsList.Values) { List _partitions; - if (_partplugin.GetInformation(_imageFormat, out _partitions)) { partition_scheme = _partplugin.Name; - partitions = _partitions; + partitions.AddRange(_partitions); + Core.Statistics.AddPartition(_partplugin.Name); break; } } @@ -128,7 +131,7 @@ namespace DiscImageChef.Commands if (_imageFormat.ImageHasPartitions()) { partition_scheme = _imageFormat.GetImageFormat(); - partitions = _imageFormat.GetPartitions(); + partitions.AddRange(_imageFormat.GetPartitions()); } if (partition_scheme == "") @@ -175,6 +178,7 @@ namespace DiscImageChef.Commands DicConsole.WriteLine(String.Format("As identified by {0}.", _plugin.Name)); _plugin.GetInformation(_imageFormat, partitions[i].PartitionStartSector, partitions[i].PartitionStartSector+partitions[i].PartitionSectors, out information); DicConsole.Write(information); + Core.Statistics.AddFilesystem(_plugin.XmlFSType.Type); } } } @@ -184,6 +188,7 @@ namespace DiscImageChef.Commands DicConsole.WriteLine(String.Format("Identified by {0}.", _plugin.Name)); _plugin.GetInformation(_imageFormat, partitions[i].PartitionStartSector, partitions[i].PartitionStartSector+partitions[i].PartitionSectors, out information); DicConsole.Write(information); + Core.Statistics.AddFilesystem(_plugin.XmlFSType.Type); } } } @@ -206,6 +211,7 @@ namespace DiscImageChef.Commands DicConsole.WriteLine(String.Format("As identified by {0}.", _plugin.Name)); _plugin.GetInformation(_imageFormat, 0, _imageFormat.GetSectors()-1, out information); DicConsole.Write(information); + Core.Statistics.AddFilesystem(_plugin.XmlFSType.Type); } } } @@ -215,6 +221,7 @@ namespace DiscImageChef.Commands DicConsole.WriteLine(String.Format("Identified by {0}.", _plugin.Name)); _plugin.GetInformation(_imageFormat, 0, _imageFormat.GetSectors()-1, out information); DicConsole.Write(information); + Core.Statistics.AddFilesystem(_plugin.XmlFSType.Type); } } } @@ -223,6 +230,8 @@ namespace DiscImageChef.Commands DicConsole.ErrorWriteLine(String.Format("Error reading file: {0}", ex.Message)); DicConsole.DebugWriteLine("Analyze command", ex.StackTrace); } + + Core.Statistics.AddCommand("analyze"); } static void IdentifyFilesystems(ImagePlugin imagePlugin, out List id_plugins, ulong partitionStart, ulong partitionEnd) diff --git a/DiscImageChef/Commands/Benchmark.cs b/DiscImageChef/Commands/Benchmark.cs index 44327fc9..229a2022 100644 --- a/DiscImageChef/Commands/Benchmark.cs +++ b/DiscImageChef/Commands/Benchmark.cs @@ -57,7 +57,7 @@ namespace DiscImageChef.Commands long mem; object ctx; double allSeparate = 0; - + System.Collections.Generic.Dictionary checksumTimes = new System.Collections.Generic.Dictionary(); DicConsole.WriteLine(); @@ -125,6 +125,7 @@ namespace DiscImageChef.Commands DicConsole.WriteLine(); DicConsole.WriteLine("Took {0} seconds to Adler32 buffer, {1} MiB/sec.", (end - start).TotalSeconds, (bufferSize / 1048576) / (end - start).TotalSeconds); allSeparate += (end - start).TotalSeconds; + checksumTimes.Add("Adler32", (end - start).TotalSeconds); #endregion Adler32 #region CRC16 @@ -155,6 +156,7 @@ namespace DiscImageChef.Commands DicConsole.WriteLine(); DicConsole.WriteLine("Took {0} seconds to CRC16 buffer, {1} MiB/sec.", (end - start).TotalSeconds, (bufferSize / 1048576) / (end - start).TotalSeconds); allSeparate += (end - start).TotalSeconds; + checksumTimes.Add("CRC16", (end - start).TotalSeconds); #endregion CRC16 #region CRC32 @@ -185,6 +187,7 @@ namespace DiscImageChef.Commands DicConsole.WriteLine(); DicConsole.WriteLine("Took {0} seconds to CRC32 buffer, {1} MiB/sec.", (end - start).TotalSeconds, (bufferSize / 1048576) / (end - start).TotalSeconds); allSeparate += (end - start).TotalSeconds; + checksumTimes.Add("CRC32", (end - start).TotalSeconds); #endregion CRC32 #region CRC64 @@ -215,6 +218,7 @@ namespace DiscImageChef.Commands DicConsole.WriteLine(); DicConsole.WriteLine("Took {0} seconds to CRC64 buffer, {1} MiB/sec.", (end - start).TotalSeconds, (bufferSize / 1048576) / (end - start).TotalSeconds); allSeparate += (end - start).TotalSeconds; + checksumTimes.Add("CRC64", (end - start).TotalSeconds); #endregion CRC64 #region Fletcher32 @@ -244,7 +248,8 @@ namespace DiscImageChef.Commands DicConsole.WriteLine(); DicConsole.WriteLine("Took {0} seconds to Fletcher32 buffer, {1} MiB/sec.", (end - start).TotalSeconds, (bufferSize / 1048576) / (end - start).TotalSeconds); - allSeparate += (end-start).TotalSeconds;*/ + allSeparate += (end-start).TotalSeconds; + checksumTimes.Add("Fletcher32", (end - start).TotalSeconds);*/ #endregion Fletcher32 #region MD5 @@ -275,6 +280,7 @@ namespace DiscImageChef.Commands DicConsole.WriteLine(); DicConsole.WriteLine("Took {0} seconds to MD5 buffer, {1} MiB/sec.", (end - start).TotalSeconds, (bufferSize / 1048576) / (end - start).TotalSeconds); allSeparate += (end - start).TotalSeconds; + checksumTimes.Add("MD5", (end - start).TotalSeconds); #endregion MD5 #region RIPEMD160 @@ -305,6 +311,7 @@ namespace DiscImageChef.Commands DicConsole.WriteLine(); DicConsole.WriteLine("Took {0} seconds to RIPEMD160 buffer, {1} MiB/sec.", (end - start).TotalSeconds, (bufferSize / 1048576) / (end - start).TotalSeconds); allSeparate += (end - start).TotalSeconds; + checksumTimes.Add("RIPEMD160", (end - start).TotalSeconds); #endregion RIPEMD160 #region SHA1 @@ -335,6 +342,7 @@ namespace DiscImageChef.Commands DicConsole.WriteLine(); DicConsole.WriteLine("Took {0} seconds to SHA1 buffer, {1} MiB/sec.", (end - start).TotalSeconds, (bufferSize / 1048576) / (end - start).TotalSeconds); allSeparate += (end - start).TotalSeconds; + checksumTimes.Add("SHA1", (end - start).TotalSeconds); #endregion SHA1 #region SHA256 @@ -365,6 +373,7 @@ namespace DiscImageChef.Commands DicConsole.WriteLine(); DicConsole.WriteLine("Took {0} seconds to SHA256 buffer, {1} MiB/sec.", (end - start).TotalSeconds, (bufferSize / 1048576) / (end - start).TotalSeconds); allSeparate += (end - start).TotalSeconds; + checksumTimes.Add("SHA256", (end - start).TotalSeconds); #endregion SHA256 #region SHA384 @@ -395,6 +404,7 @@ namespace DiscImageChef.Commands DicConsole.WriteLine(); DicConsole.WriteLine("Took {0} seconds to SHA384 buffer, {1} MiB/sec.", (end - start).TotalSeconds, (bufferSize / 1048576) / (end - start).TotalSeconds); allSeparate += (end - start).TotalSeconds; + checksumTimes.Add("SHA384", (end - start).TotalSeconds); #endregion SHA384 #region SHA512 @@ -425,6 +435,7 @@ namespace DiscImageChef.Commands DicConsole.WriteLine(); DicConsole.WriteLine("Took {0} seconds to SHA512 buffer, {1} MiB/sec.", (end - start).TotalSeconds, (bufferSize / 1048576) / (end - start).TotalSeconds); allSeparate += (end - start).TotalSeconds; + checksumTimes.Add("SHA512", (end - start).TotalSeconds); #endregion SHA512 #region SpamSum @@ -455,6 +466,7 @@ namespace DiscImageChef.Commands DicConsole.WriteLine(); DicConsole.WriteLine("Took {0} seconds to SpamSum buffer, {1} MiB/sec.", (end - start).TotalSeconds, (bufferSize / 1048576) / (end - start).TotalSeconds); allSeparate += (end - start).TotalSeconds; + checksumTimes.Add("SpamSum", (end - start).TotalSeconds); #endregion SpamSum #region Entropy @@ -489,6 +501,7 @@ namespace DiscImageChef.Commands DicConsole.WriteLine(); DicConsole.WriteLine("Took {0} seconds to entropy buffer, {1} MiB/sec.", (end - start).TotalSeconds, (bufferSize / 1048576) / (end - start).TotalSeconds); + double entropyTime = (end - start).TotalSeconds; #endregion Entropy #region Multitasking @@ -657,6 +670,9 @@ namespace DiscImageChef.Commands DicConsole.WriteLine(); DicConsole.WriteLine("Max memory used is {0} bytes", maxMemory); DicConsole.WriteLine("Min memory used is {0} bytes", minMemory); + + Core.Statistics.AddCommand("benchmark"); + Core.Statistics.AddBenchmark(checksumTimes, entropyTime, (end - start).TotalSeconds, allSeparate, maxMemory, minMemory); } #region Threading helpers diff --git a/DiscImageChef/Commands/Checksum.cs b/DiscImageChef/Commands/Checksum.cs index db2f78cd..8c96a469 100644 --- a/DiscImageChef/Commands/Checksum.cs +++ b/DiscImageChef/Commands/Checksum.cs @@ -77,6 +77,8 @@ namespace DiscImageChef.Commands } inputFormat.OpenImage(options.InputFile); + Core.Statistics.AddMediaFormat(inputFormat.GetImageFormat()); + Core.Statistics.AddMedia(inputFormat.ImageInfo.mediaType, false); if (inputFormat.ImageInfo.imageHasPartitions) { @@ -1045,6 +1047,8 @@ namespace DiscImageChef.Commands if (options.DoSpamSum) DicConsole.WriteLine("Disk's SpamSum: {0}", ssctx.End()); } + + Core.Statistics.AddCommand("checksum"); } #region Threading helpers diff --git a/DiscImageChef/Commands/Compare.cs b/DiscImageChef/Commands/Compare.cs index 93d64837..99a3222c 100644 --- a/DiscImageChef/Commands/Compare.cs +++ b/DiscImageChef/Commands/Compare.cs @@ -96,6 +96,11 @@ namespace DiscImageChef.Commands input1Format.OpenImage(options.InputFile1); input2Format.OpenImage(options.InputFile2); + Core.Statistics.AddMediaFormat(input1Format.GetImageFormat()); + Core.Statistics.AddMediaFormat(input2Format.GetImageFormat()); + Core.Statistics.AddMedia(input1Format.ImageInfo.mediaType, false); + Core.Statistics.AddMedia(input2Format.ImageInfo.mediaType, false); + StringBuilder sb = new StringBuilder(); if (options.Verbose) @@ -422,6 +427,8 @@ namespace DiscImageChef.Commands sb.AppendLine("Images do not differ"); DicConsole.WriteLine(sb.ToString()); + + Core.Statistics.AddCommand("compare"); } private static void CompareBytes(out bool different, out bool sameSize, byte[] compareArray1, byte[] compareArray2) diff --git a/DiscImageChef/Commands/Configure.cs b/DiscImageChef/Commands/Configure.cs new file mode 100644 index 00000000..2820a1c6 --- /dev/null +++ b/DiscImageChef/Commands/Configure.cs @@ -0,0 +1,169 @@ +// /*************************************************************************** +// The Disc Image Chef +// ---------------------------------------------------------------------------- +// +// Filename : Configure.cs +// Version : 1.0 +// Author(s) : Natalia Portillo +// +// Component : Component +// +// Revision : $Revision$ +// Last change by : $Author$ +// Date : $Date$ +// +// --[ Description ] ---------------------------------------------------------- +// +// Description +// +// --[ License ] -------------------------------------------------------------- +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as +// published by the Free Software Foundation, either version 3 of the +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +// ---------------------------------------------------------------------------- +// Copyright (C) 2011-2015 Claunia.com +// ****************************************************************************/ +// //$Id$ +using System; +using DiscImageChef.Console; +using DiscImageChef.Settings; + +namespace DiscImageChef.Commands +{ + public static class Configure + { + public static void doConfigure () + { + ConsoleKeyInfo pressedKey = new ConsoleKeyInfo(); + + pressedKey = new ConsoleKeyInfo(); + while (pressedKey.Key != ConsoleKey.Y && pressedKey.Key != ConsoleKey.N) + { + DicConsole.Write("Do you want to save device reports globally? (Y/N): "); + pressedKey = System.Console.ReadKey(); + DicConsole.WriteLine(); + } + + Settings.Settings.Current.SaveReportsGlobally = pressedKey.Key == ConsoleKey.Y; + + pressedKey = new ConsoleKeyInfo(); + while (pressedKey.Key != ConsoleKey.Y && pressedKey.Key != ConsoleKey.N) + { + DicConsole.Write("Do you want to save stats about your DiscImageChef usage? (Y/N): "); + pressedKey = System.Console.ReadKey(); + DicConsole.WriteLine(); + } + + if (pressedKey.Key == ConsoleKey.Y) + { + Settings.Settings.Current.Stats = new StatsSettings(); + + pressedKey = new ConsoleKeyInfo(); + while (pressedKey.Key != ConsoleKey.Y && pressedKey.Key != ConsoleKey.N) + { + DicConsole.Write("Do you want to share your stats anonymously? (Y/N): "); + pressedKey = System.Console.ReadKey(); + DicConsole.WriteLine(); + } + Settings.Settings.Current.Stats.ShareStats = pressedKey.Key == ConsoleKey.Y; + + pressedKey = new ConsoleKeyInfo(); + while (pressedKey.Key != ConsoleKey.Y && pressedKey.Key != ConsoleKey.N) + { + DicConsole.Write("Do you want to gather statistics about benchmarks? (Y/N): "); + pressedKey = System.Console.ReadKey(); + DicConsole.WriteLine(); + } + Settings.Settings.Current.Stats.BenchmarkStats = pressedKey.Key == ConsoleKey.Y; + + pressedKey = new ConsoleKeyInfo(); + while (pressedKey.Key != ConsoleKey.Y && pressedKey.Key != ConsoleKey.N) + { + DicConsole.Write("Do you want to gather statistics about command usage? (Y/N): "); + pressedKey = System.Console.ReadKey(); + DicConsole.WriteLine(); + } + Settings.Settings.Current.Stats.CommandStats = pressedKey.Key == ConsoleKey.Y; + + pressedKey = new ConsoleKeyInfo(); + while (pressedKey.Key != ConsoleKey.Y && pressedKey.Key != ConsoleKey.N) + { + DicConsole.Write("Do you want to gather statistics about found devices? (Y/N): "); + pressedKey = System.Console.ReadKey(); + DicConsole.WriteLine(); + } + Settings.Settings.Current.Stats.DeviceStats = pressedKey.Key == ConsoleKey.Y; + + pressedKey = new ConsoleKeyInfo(); + while (pressedKey.Key != ConsoleKey.Y && pressedKey.Key != ConsoleKey.N) + { + DicConsole.Write("Do you want to gather statistics about found filesystems? (Y/N): "); + pressedKey = System.Console.ReadKey(); + DicConsole.WriteLine(); + } + Settings.Settings.Current.Stats.FilesystemStats = pressedKey.Key == ConsoleKey.Y; + + pressedKey = new ConsoleKeyInfo(); + while (pressedKey.Key != ConsoleKey.Y && pressedKey.Key != ConsoleKey.N) + { + DicConsole.Write("Do you want to gather statistics about found media image formats? (Y/N): "); + pressedKey = System.Console.ReadKey(); + DicConsole.WriteLine(); + } + Settings.Settings.Current.Stats.MediaImageStats = pressedKey.Key == ConsoleKey.Y; + + pressedKey = new ConsoleKeyInfo(); + while (pressedKey.Key != ConsoleKey.Y && pressedKey.Key != ConsoleKey.N) + { + DicConsole.Write("Do you want to gather statistics about scanned media? (Y/N): "); + pressedKey = System.Console.ReadKey(); + DicConsole.WriteLine(); + } + Settings.Settings.Current.Stats.MediaScanStats = pressedKey.Key == ConsoleKey.Y; + + pressedKey = new ConsoleKeyInfo(); + while (pressedKey.Key != ConsoleKey.Y && pressedKey.Key != ConsoleKey.N) + { + DicConsole.Write("Do you want to gather statistics about found partitioning schemes? (Y/N): "); + pressedKey = System.Console.ReadKey(); + DicConsole.WriteLine(); + } + Settings.Settings.Current.Stats.PartitionStats = pressedKey.Key == ConsoleKey.Y; + + pressedKey = new ConsoleKeyInfo(); + while (pressedKey.Key != ConsoleKey.Y && pressedKey.Key != ConsoleKey.N) + { + DicConsole.Write("Do you want to gather statistics about media types? (Y/N): "); + pressedKey = System.Console.ReadKey(); + DicConsole.WriteLine(); + } + Settings.Settings.Current.Stats.MediaStats = pressedKey.Key == ConsoleKey.Y; + + pressedKey = new ConsoleKeyInfo(); + while (pressedKey.Key != ConsoleKey.Y && pressedKey.Key != ConsoleKey.N) + { + DicConsole.Write("Do you want to gather statistics about media image verifications? (Y/N): "); + pressedKey = System.Console.ReadKey(); + DicConsole.WriteLine(); + } + Settings.Settings.Current.Stats.VerifyStats = pressedKey.Key == ConsoleKey.Y; + } + else + Settings.Settings.Current.Stats = null; + + Settings.Settings.SaveSettings(); + } + } +} + diff --git a/DiscImageChef/Commands/CreateSidecar.cs b/DiscImageChef/Commands/CreateSidecar.cs index 0ae3ea66..3a5e817f 100644 --- a/DiscImageChef/Commands/CreateSidecar.cs +++ b/DiscImageChef/Commands/CreateSidecar.cs @@ -93,6 +93,8 @@ namespace DiscImageChef.Commands return; } + Core.Statistics.AddMediaFormat(_imageFormat.GetImageFormat()); + FileInfo fi = new FileInfo(options.InputFile); FileStream fs = new FileStream(options.InputFile, FileMode.Open, FileAccess.Read); @@ -303,6 +305,7 @@ namespace DiscImageChef.Commands Metadata.MediaType.MediaTypeToString(dskType, out dscType, out dscSubType); sidecar.OpticalDisc[0].DiscType = dscType; sidecar.OpticalDisc[0].DiscSubType = dscSubType; + Core.Statistics.AddMedia(dskType, false); try { @@ -502,6 +505,7 @@ namespace DiscImageChef.Commands if (_partplugin.GetInformation(_imageFormat, out _partitions)) { partitions = _partitions; + Core.Statistics.AddPartition(_partplugin.Name); break; } } @@ -531,6 +535,7 @@ namespace DiscImageChef.Commands string foo; _plugin.GetInformation(_imageFormat, partitions[i].PartitionStartSector, partitions[i].PartitionStartSector + partitions[i].PartitionSectors - 1, out foo); lstFs.Add(_plugin.XmlFSType); + Core.Statistics.AddFilesystem(_plugin.XmlFSType.Type); } } catch @@ -560,6 +565,7 @@ namespace DiscImageChef.Commands string foo; _plugin.GetInformation(_imageFormat, (ulong)xmlTrk.StartSector, (ulong)xmlTrk.EndSector, out foo); lstFs.Add(_plugin.XmlFSType); + Core.Statistics.AddFilesystem(_plugin.XmlFSType.Type); } } catch @@ -660,6 +666,7 @@ namespace DiscImageChef.Commands Metadata.MediaType.MediaTypeToString(_imageFormat.ImageInfo.mediaType, out dskType, out dskSubType); sidecar.BlockMedia[0].DiskType = dskType; sidecar.BlockMedia[0].DiskSubType = dskSubType; + Core.Statistics.AddMedia(_imageFormat.ImageInfo.mediaType, false); sidecar.BlockMedia[0].Dimensions = Metadata.Dimensions.DimensionsFromMediaType(_imageFormat.ImageInfo.mediaType); @@ -679,6 +686,7 @@ namespace DiscImageChef.Commands if (_partplugin.GetInformation(_imageFormat, out _partitions)) { partitions = _partitions; + Core.Statistics.AddPartition(_partplugin.Name); break; } } @@ -708,6 +716,7 @@ namespace DiscImageChef.Commands string foo; _plugin.GetInformation(_imageFormat, partitions[i].PartitionStartSector, partitions[i].PartitionStartSector + partitions[i].PartitionSectors - 1, out foo); lstFs.Add(_plugin.XmlFSType); + Core.Statistics.AddFilesystem(_plugin.XmlFSType.Type); } } catch @@ -737,6 +746,7 @@ namespace DiscImageChef.Commands string foo; _plugin.GetInformation(_imageFormat, 0, _imageFormat.GetSectors() - 1, out foo); lstFs.Add(_plugin.XmlFSType); + Core.Statistics.AddFilesystem(_plugin.XmlFSType.Type); } } catch @@ -810,6 +820,8 @@ namespace DiscImageChef.Commands System.Xml.Serialization.XmlSerializer xmlSer = new System.Xml.Serialization.XmlSerializer(typeof(CICMMetadataType)); xmlSer.Serialize(xmlFs, sidecar); xmlFs.Close(); + + Core.Statistics.AddCommand("create-sidecar"); } catch (Exception ex) { diff --git a/DiscImageChef/Commands/Decode.cs b/DiscImageChef/Commands/Decode.cs index 818cfa8d..801bd9d5 100644 --- a/DiscImageChef/Commands/Decode.cs +++ b/DiscImageChef/Commands/Decode.cs @@ -62,6 +62,8 @@ namespace DiscImageChef.Commands } inputFormat.OpenImage(options.InputFile); + Core.Statistics.AddMediaFormat(inputFormat.GetImageFormat()); + Core.Statistics.AddMedia(inputFormat.ImageInfo.mediaType, false); if (options.DiskTags) { @@ -238,6 +240,8 @@ namespace DiscImageChef.Commands } } } + + Core.Statistics.AddCommand("decode"); } } } diff --git a/DiscImageChef/Commands/DeviceInfo.cs b/DiscImageChef/Commands/DeviceInfo.cs index 3c9be34b..0956c263 100644 --- a/DiscImageChef/Commands/DeviceInfo.cs +++ b/DiscImageChef/Commands/DeviceInfo.cs @@ -67,6 +67,8 @@ namespace DiscImageChef.Commands return; } + Core.Statistics.AddDevice(dev); + if (dev.IsUSB) { DicConsole.WriteLine("USB device"); @@ -1002,6 +1004,8 @@ namespace DiscImageChef.Commands DicConsole.ErrorWriteLine("Unknown device type {0}, cannot get information.", dev.Type); break; } + + Core.Statistics.AddCommand("device-info"); } static void doWriteFile(string outputPrefix, string outputSuffix, string whatWriting, byte[] data) diff --git a/DiscImageChef/Commands/DeviceReport.cs b/DiscImageChef/Commands/DeviceReport.cs index ae5062bd..21b190bc 100644 --- a/DiscImageChef/Commands/DeviceReport.cs +++ b/DiscImageChef/Commands/DeviceReport.cs @@ -66,6 +66,8 @@ namespace DiscImageChef.Commands return; } + Core.Statistics.AddDevice(dev); + switch (dev.Type) { case DeviceType.ATA: @@ -85,6 +87,8 @@ namespace DiscImageChef.Commands default: throw new NotSupportedException("Unknown device type."); } + + Core.Statistics.AddCommand("device-report"); } static void doATADeviceReport(DeviceReportSubOptions options, Device dev) @@ -679,7 +683,7 @@ namespace DiscImageChef.Commands else xmlFile = dev.Model + ".xml"; ConsoleKeyInfo pressedKey; - bool removable = true; + bool removable = false; if (dev.IsUSB) { @@ -1280,20 +1284,23 @@ namespace DiscImageChef.Commands report.SCSI.Inquiry.ResponseDataFormat = inq.ResponseDataFormat; report.SCSI.Inquiry.ResponseDataFormatSpecified = true; } - if (!string.IsNullOrWhiteSpace(StringHandlers.CToString(inq.VendorIdentification).Trim())) + if (!string.IsNullOrWhiteSpace(StringHandlers.CToString(inq.VendorIdentification))) { report.SCSI.Inquiry.VendorIdentification = StringHandlers.CToString(inq.VendorIdentification).Trim(); - report.SCSI.Inquiry.VendorIdentificationSpecified = true; + if (!string.IsNullOrWhiteSpace(report.SCSI.Inquiry.VendorIdentification)) + report.SCSI.Inquiry.VendorIdentificationSpecified = true; } - if (!string.IsNullOrWhiteSpace(StringHandlers.CToString(inq.ProductIdentification).Trim())) + if (!string.IsNullOrWhiteSpace(StringHandlers.CToString(inq.ProductIdentification))) { report.SCSI.Inquiry.ProductIdentification = StringHandlers.CToString(inq.ProductIdentification).Trim(); - report.SCSI.Inquiry.ProductIdentificationSpecified = true; + if (!string.IsNullOrWhiteSpace(report.SCSI.Inquiry.ProductIdentification)) + report.SCSI.Inquiry.ProductIdentificationSpecified = true; } - if (!string.IsNullOrWhiteSpace(StringHandlers.CToString(inq.ProductRevisionLevel).Trim())) + if (!string.IsNullOrWhiteSpace(StringHandlers.CToString(inq.ProductRevisionLevel))) { report.SCSI.Inquiry.ProductRevisionLevel = StringHandlers.CToString(inq.ProductRevisionLevel).Trim(); - report.SCSI.Inquiry.ProductRevisionLevelSpecified = true; + if (!string.IsNullOrWhiteSpace(report.SCSI.Inquiry.ProductRevisionLevel)) + report.SCSI.Inquiry.ProductRevisionLevelSpecified = true; } if (inq.VersionDescriptors != null) { @@ -1390,19 +1397,39 @@ namespace DiscImageChef.Commands Decoders.SCSI.PeripheralDeviceTypes devType = dev.SCSIType; DicConsole.WriteLine("Querying all mode pages and subpages using SCSI MODE SENSE (10)..."); + sense = dev.ModeSense10(out buffer, out senseBuffer, false, true, ScsiModeSensePageControl.Default, 0x3F, 0xFF, timeout, out duration); + if (sense || dev.Error) + { + DicConsole.WriteLine("Querying all mode pages using SCSI MODE SENSE (10)..."); + sense = dev.ModeSense10(out buffer, out senseBuffer, false, true, ScsiModeSensePageControl.Default, 0x3F, 0x00, timeout, out duration); + if (!sense && dev.Error) + { + report.SCSI.SupportsModeSense10 = true; + report.SCSI.SupportsModeSubpages = false; + decMode = Decoders.SCSI.Modes.DecodeMode10(buffer, devType); + } + } + else + { + report.SCSI.SupportsModeSense10 = true; + report.SCSI.SupportsModeSubpages = true; + decMode = Decoders.SCSI.Modes.DecodeMode10(buffer, devType); + } + + DicConsole.WriteLine("Querying all mode pages and subpages using SCSI MODE SENSE (6)..."); + sense = dev.ModeSense6(out buffer, out senseBuffer, false, ScsiModeSensePageControl.Default, 0x3F, 0xFF, timeout, out duration); if (sense || dev.Error) { - sense = dev.ModeSense6(out buffer, out senseBuffer, false, ScsiModeSensePageControl.Default, 0x3F, 0x00, timeout, out duration); DicConsole.WriteLine("Querying all mode pages using SCSI MODE SENSE (6)..."); + sense = dev.ModeSense6(out buffer, out senseBuffer, false, ScsiModeSensePageControl.Default, 0x3F, 0x00, timeout, out duration); + if (sense || dev.Error) + { + DicConsole.WriteLine("Querying SCSI MODE SENSE (6)..."); + sense = dev.ModeSense(out buffer, out senseBuffer, timeout, out duration); + } } else report.SCSI.SupportsModeSubpages = true; - - if (sense || dev.Error) - { - DicConsole.WriteLine("Querying SCSI MODE SENSE (6)..."); - sense = dev.ModeSense(out buffer, out senseBuffer, timeout, out duration); - } if (!sense && !dev.Error && !decMode.HasValue) decMode = Decoders.SCSI.Modes.DecodeMode6(buffer, devType); @@ -2121,6 +2148,20 @@ namespace DiscImageChef.Commands tryPioneer |= dev.Manufacturer.ToLowerInvariant() == "pioneer"; tryNEC |= dev.Manufacturer.ToLowerInvariant() == "nec"; + // Very old CD drives do not contain mode page 2Ah neither GET CONFIGURATION, so just try all CDs on them + // Also don't get confident, some drives didn't know CD-RW but are able to read them + if (mediaTypes.Count == 0 || mediaTypes.Contains("CD-ROM")) + { + if (!mediaTypes.Contains("CD-ROM")) + mediaTypes.Add("CD-ROM"); + if (!mediaTypes.Contains("Audio CD")) + mediaTypes.Add("Audio CD"); + if (!mediaTypes.Contains("CD-R")) + mediaTypes.Add("CD-R"); + if (!mediaTypes.Contains("CD-RW")) + mediaTypes.Add("CD-RW"); + } + mediaTypes.Sort(); List mediaTests = new List(); foreach (string mediaType in mediaTypes) @@ -2436,7 +2477,7 @@ namespace DiscImageChef.Commands mediaTest.SupportsReadCdMsfRaw = !dev.ReadCdMsf(out buffer, out senseBuffer, 0x00000200, 0x00000201, 2352, MmcSectorTypes.AllTypes, false, false, MmcHeaderCodes.AllHeaders, true, true, MmcErrorField.None, MmcSubchannel.None, timeout, out duration); } - if (mediaTest.SupportsReadCdRaw) + if (mediaTest.SupportsReadCdRaw || mediaType == "Audio CD") { DicConsole.WriteLine("Trying to read CD Lead-In..."); for (int i = -150; i < 0; i++) @@ -2453,7 +2494,10 @@ namespace DiscImageChef.Commands } DicConsole.WriteLine("Trying to read CD Lead-Out..."); - mediaTest.CanReadLeadOut = !dev.ReadCd(out buffer, out senseBuffer, (uint)(mediaTest.Blocks + 1), 2352, 1, MmcSectorTypes.AllTypes, false, false, true, MmcHeaderCodes.AllHeaders, true, true, MmcErrorField.None, MmcSubchannel.None, timeout, out duration); + if (mediaType == "Audio CD") + mediaTest.CanReadLeadOut = dev.ReadCd(out buffer, out senseBuffer, (uint)(mediaTest.Blocks + 1), 2352, 1, MmcSectorTypes.CDDA, false, false, false, MmcHeaderCodes.None, true, false, MmcErrorField.None, MmcSubchannel.None, timeout, out duration); + else + mediaTest.CanReadLeadOut = !dev.ReadCd(out buffer, out senseBuffer, (uint)(mediaTest.Blocks + 1), 2352, 1, MmcSectorTypes.AllTypes, false, false, true, MmcHeaderCodes.AllHeaders, true, true, MmcErrorField.None, MmcSubchannel.None, timeout, out duration); } if (mediaType == "Audio CD" && mediaTest.SupportsReadCd) @@ -2600,7 +2644,7 @@ namespace DiscImageChef.Commands mediaTest.SupportsReadLong = true; if (decSense.Value.InformationValid && decSense.Value.ILI) { - mediaTest.LongBlockSize = 0xFFFF - decSense.Value.Information; + mediaTest.LongBlockSize = 0xFFFF - (decSense.Value.Information & 0xFFFF); mediaTest.LongBlockSizeSpecified = true; } } @@ -2652,12 +2696,25 @@ namespace DiscImageChef.Commands } else if (mediaTest.BlockSize == 2048) { - sense = dev.ReadLong10(out buffer, out senseBuffer, false, false, 0, 2380, timeout, out duration); - if (!sense && !dev.Error) + if (mediaType.StartsWith("DVD")) { - mediaTest.SupportsReadLong = true; - mediaTest.LongBlockSize = 2380; - mediaTest.LongBlockSizeSpecified = true; + sense = dev.ReadLong10(out buffer, out senseBuffer, false, false, 0, 37856, timeout, out duration); + if (!sense && !dev.Error) + { + mediaTest.SupportsReadLong = true; + mediaTest.LongBlockSize = 37856; + mediaTest.LongBlockSizeSpecified = true; + } + } + else + { + sense = dev.ReadLong10(out buffer, out senseBuffer, false, false, 0, 2380, timeout, out duration); + if (!sense && !dev.Error) + { + mediaTest.SupportsReadLong = true; + mediaTest.LongBlockSize = 2380; + mediaTest.LongBlockSizeSpecified = true; + } } } else if (mediaTest.BlockSize == 4096) @@ -2710,12 +2767,18 @@ namespace DiscImageChef.Commands if (pressedKey.Key == ConsoleKey.Y) { - for (ushort i = (ushort)mediaTest.BlockSize; i < 0x4000; i++) + for (ushort i = (ushort)mediaTest.BlockSize; i < (ushort)mediaTest.BlockSize * 36; i++) { DicConsole.Write("\rTrying to READ LONG with a size of {0} bytes...", i); sense = dev.ReadLong10(out buffer, out senseBuffer, false, false, 0, i, timeout, out duration); if (!sense) { + if (options.Debug) + { + FileStream bingo = new FileStream(string.Format("{0}_readlong.bin", mediaType), FileMode.Create); + bingo.Write(buffer, 0, buffer.Length); + bingo.Close(); + } mediaTest.LongBlockSize = i; mediaTest.LongBlockSizeSpecified = true; break; @@ -3149,7 +3212,7 @@ namespace DiscImageChef.Commands mediaTest.SupportsReadLong = true; if (decSense.Value.InformationValid && decSense.Value.ILI) { - mediaTest.LongBlockSize = 0xFFFF - decSense.Value.Information; + mediaTest.LongBlockSize = 0xFFFF - (decSense.Value.Information & 0xFFFF); mediaTest.LongBlockSizeSpecified = true; } } @@ -3227,12 +3290,18 @@ namespace DiscImageChef.Commands if (pressedKey.Key == ConsoleKey.Y) { - for (ushort i = (ushort)mediaTest.BlockSize; i < 0x4000; i++) + for (ushort i = (ushort)mediaTest.BlockSize; i < 0x8000; i++) { DicConsole.Write("\rTrying to READ LONG with a size of {0} bytes...", i); sense = dev.ReadLong10(out buffer, out senseBuffer, false, false, 0, i, timeout, out duration); if (!sense) { + if (options.Debug) + { + FileStream bingo = new FileStream(string.Format("{0}_readlong.bin", mediaTest.MediumTypeName), FileMode.Create); + bingo.Write(buffer, 0, buffer.Length); + bingo.Close(); + } mediaTest.LongBlockSize = i; mediaTest.LongBlockSizeSpecified = true; break; @@ -3344,7 +3413,7 @@ namespace DiscImageChef.Commands report.SCSI.ReadCapabilities.SupportsReadLong = true; if (decSense.Value.InformationValid && decSense.Value.ILI) { - report.SCSI.ReadCapabilities.LongBlockSize = 0xFFFF - decSense.Value.Information; + report.SCSI.ReadCapabilities.LongBlockSize = 0xFFFF - (decSense.Value.Information & 0xFFFF); report.SCSI.ReadCapabilities.LongBlockSizeSpecified = true; } } @@ -3428,6 +3497,12 @@ namespace DiscImageChef.Commands sense = dev.ReadLong10(out buffer, out senseBuffer, false, false, 0, i, timeout, out duration); if (!sense) { + if (options.Debug) + { + FileStream bingo = new FileStream(string.Format("{0}_readlong.bin", dev.Model), FileMode.Create); + bingo.Write(buffer, 0, buffer.Length); + bingo.Close(); + } report.SCSI.ReadCapabilities.LongBlockSize = i; report.SCSI.ReadCapabilities.LongBlockSizeSpecified = true; break; @@ -3445,6 +3520,23 @@ namespace DiscImageChef.Commands System.Xml.Serialization.XmlSerializer xmlSer = new System.Xml.Serialization.XmlSerializer(typeof(Metadata.DeviceReport)); xmlSer.Serialize(xmlFs, report); xmlFs.Close(); + + if (Settings.Settings.Current.SaveReportsGlobally && !String.IsNullOrEmpty (Settings.Settings.ReportsPath)) + { + xmlFs = new FileStream(Path.Combine(Settings.Settings.ReportsPath, xmlFile), FileMode.Create); + xmlSer.Serialize(xmlFs, report); + xmlFs.Close(); + } + + if (Settings.Settings.Current.ShareReports) + { + SubmitReport(xmlSer); + } + } + + static void SubmitReport(System.Xml.Serialization.XmlSerializer xmlSer) + { + // TODO: Implement this } } } diff --git a/DiscImageChef/Commands/DumpMedia.cs b/DiscImageChef/Commands/DumpMedia.cs index 420c5257..1a7eb0a1 100644 --- a/DiscImageChef/Commands/DumpMedia.cs +++ b/DiscImageChef/Commands/DumpMedia.cs @@ -81,6 +81,8 @@ namespace DiscImageChef.Commands return; } + Core.Statistics.AddDevice(dev); + switch (dev.Type) { case DeviceType.ATA: @@ -100,6 +102,8 @@ namespace DiscImageChef.Commands default: throw new NotSupportedException("Unknown device type."); } + + Core.Statistics.AddCommand("dump-media"); } static void doATAMediaScan(DumpMediaSubOptions options, Device dev) @@ -1052,7 +1056,7 @@ namespace DiscImageChef.Commands DicConsole.WriteLine("Media identified as {0}", dskType); byte[] readBuffer; - uint blocksToRead = 255; + uint blocksToRead = 64; ulong errored = 0; DateTime start; @@ -1337,7 +1341,7 @@ namespace DiscImageChef.Commands rawAble = true; if (decSense.Value.InformationValid && decSense.Value.ILI) { - longBlockSize = 0xFFFF - decSense.Value.Information; + longBlockSize = 0xFFFF - (decSense.Value.Information & 0xFFFF); readLong16 = !dev.ReadLong16(out readBuffer, out senseBuf, false, 0, longBlockSize, dev.Timeout, out duration); } } @@ -1356,7 +1360,7 @@ namespace DiscImageChef.Commands rawAble = true; if (decSense.Value.InformationValid && decSense.Value.ILI) { - longBlockSize = 0xFFFF - decSense.Value.Information; + longBlockSize = 0xFFFF - (decSense.Value.Information & 0xFFFF); readLong10 = !dev.ReadLong10(out readBuffer, out senseBuf, false, false, 0, (ushort)longBlockSize, dev.Timeout, out duration); } } @@ -1485,7 +1489,7 @@ namespace DiscImageChef.Commands rawAble = true; if (decSense.Value.InformationValid && decSense.Value.ILI) { - longBlockSize = 0xFFFF - decSense.Value.Information; + longBlockSize = 0xFFFF - (decSense.Value.Information & 0xFFFF); syqReadLong10 = !dev.SyQuestReadLong10(out readBuffer, out senseBuf, 0, longBlockSize, dev.Timeout, out duration); ; } @@ -1504,7 +1508,7 @@ namespace DiscImageChef.Commands rawAble = true; if (decSense.Value.InformationValid && decSense.Value.ILI) { - longBlockSize = 0xFFFF - decSense.Value.Information; + longBlockSize = 0xFFFF - (decSense.Value.Information & 0xFFFF); syqReadLong6 = !dev.SyQuestReadLong6(out readBuffer, out senseBuf, 0, longBlockSize, dev.Timeout, out duration); ; } @@ -1932,6 +1936,8 @@ namespace DiscImageChef.Commands xmlSer.Serialize(xmlFs, sidecar); xmlFs.Close(); } + + Core.Statistics.AddMedia(dskType, true); } static void initMHDDLogFile(string outputFile, Device dev, ulong blocks, ulong blockSize, ulong blocksToRead) diff --git a/DiscImageChef/Commands/Entropy.cs b/DiscImageChef/Commands/Entropy.cs index 70ea8544..452efe46 100644 --- a/DiscImageChef/Commands/Entropy.cs +++ b/DiscImageChef/Commands/Entropy.cs @@ -63,6 +63,8 @@ namespace DiscImageChef.Commands } inputFormat.OpenImage(options.InputFile); + Core.Statistics.AddMediaFormat(inputFormat.GetImageFormat()); + Core.Statistics.AddMedia(inputFormat.ImageInfo.mediaType, false); if (options.SeparatedTracks) { @@ -170,7 +172,7 @@ namespace DiscImageChef.Commands if(options.DuplicatedSectors) DicConsole.WriteLine("Disk has {0} unique sectors ({1:P3})", uniqueSectors.Count, (double)uniqueSectors.Count/(double)sectors); - + Core.Statistics.AddCommand("entropy"); } } } diff --git a/DiscImageChef/Commands/Formats.cs b/DiscImageChef/Commands/Formats.cs index 3eae0795..a837f296 100644 --- a/DiscImageChef/Commands/Formats.cs +++ b/DiscImageChef/Commands/Formats.cs @@ -83,6 +83,8 @@ namespace DiscImageChef.Commands else DicConsole.WriteLine(kvp.Value.Name); } + + Core.Statistics.AddCommand("formats"); } } } diff --git a/DiscImageChef/Commands/MediaInfo.cs b/DiscImageChef/Commands/MediaInfo.cs index 668c1597..68f776bd 100644 --- a/DiscImageChef/Commands/MediaInfo.cs +++ b/DiscImageChef/Commands/MediaInfo.cs @@ -67,6 +67,8 @@ namespace DiscImageChef.Commands return; } + Core.Statistics.AddDevice(dev); + switch (dev.Type) { case DeviceType.ATA: @@ -86,6 +88,8 @@ namespace DiscImageChef.Commands default: throw new NotSupportedException("Unknown device type."); } + + Core.Statistics.AddCommand("media-info"); } static void doATAMediaInfo(string outputPrefix, Device dev) @@ -1076,6 +1080,7 @@ namespace DiscImageChef.Commands dskType = MediaType.FlashDrive; DicConsole.WriteLine("Media identified as {0}", dskType); + Core.Statistics.AddMedia(dskType, true); sense = dev.ReadMediaSerialNumber(out cmdBuf, out senseBuf, dev.Timeout, out duration); if (sense) diff --git a/DiscImageChef/Commands/MediaScan.cs b/DiscImageChef/Commands/MediaScan.cs index bec5db13..04891113 100644 --- a/DiscImageChef/Commands/MediaScan.cs +++ b/DiscImageChef/Commands/MediaScan.cs @@ -57,14 +57,12 @@ namespace DiscImageChef.Commands static string ibgMediaType; static double ibgDivider; static bool ibgStartSet; - static int ibgMinSampleRate; static double ibgMaxSpeed; static double ibgIntSpeed; static int ibgSnaps; -static ulong ibgIntSector = 0; -static double ibgIntTime = 0; -static int ibgSampleRate; - + static ulong ibgIntSector = 0; + static double ibgIntTime = 0; + static int ibgSampleRate; public static void doMediaScan(MediaScanSubOptions options) { @@ -91,6 +89,8 @@ static int ibgSampleRate; return; } + Core.Statistics.AddDevice(dev); + switch (dev.Type) { case DeviceType.ATA: @@ -110,6 +110,8 @@ static int ibgSampleRate; default: throw new NotSupportedException("Unknown device type."); } + + Core.Statistics.AddCommand("media-scan"); } static void doATAMediaScan(string MHDDLogPath, string IBGLogPath, string devicePath, Device dev) @@ -301,7 +303,7 @@ static int ibgSampleRate; compactDisc = false; byte[] readBuffer; - uint blocksToRead = 255; + uint blocksToRead = 64; ulong A = 0; // <3ms ulong B = 0; // >=3ms, <10ms @@ -729,6 +731,8 @@ static int ibgSampleRate; if (seekTotal != 0 || seekMin != double.MaxValue || seekMax != double.MinValue) DicConsole.WriteLine("Testing {0} seeks, longest seek took {1} ms, fastest one took {2} ms. ({3} ms average)", seekTimes, seekMax, seekMin, seekTotal / 1000); + + Core.Statistics.AddMediaScan((long)A, (long)B, (long)C, (long)D, (long)E, (long)F, (long)blocks, (long)errored, (long)(blocks - errored)); } static void initMHDDLogFile(string outputFile, Device dev, ulong blocks, ulong blockSize, ulong blocksToRead) @@ -873,12 +877,11 @@ static int ibgSampleRate; ibgDatePoint = DateTime.Now; ibgCulture = new CultureInfo("en-US"); ibgStartSet = false; - ibgMinSampleRate = int.MaxValue; ibgMaxSpeed = 0; - ibgIntSpeed = 0; - ibgSnaps = 0; - ibgIntSector = 0; -ibgIntTime = 0; + ibgIntSpeed = 0; + ibgSnaps = 0; + ibgIntSector = 0; + ibgIntTime = 0; switch (currentProfile) { diff --git a/DiscImageChef/Commands/PrintHex.cs b/DiscImageChef/Commands/PrintHex.cs index 684adaf9..dd23f538 100644 --- a/DiscImageChef/Commands/PrintHex.cs +++ b/DiscImageChef/Commands/PrintHex.cs @@ -89,6 +89,8 @@ namespace DiscImageChef.Commands DiscImageChef.PrintHex.PrintHexArray(sector, options.WidthBytes); } + + Core.Statistics.AddCommand("print-hex"); } } } diff --git a/DiscImageChef/Commands/Statistics.cs b/DiscImageChef/Commands/Statistics.cs new file mode 100644 index 00000000..de2cd7b0 --- /dev/null +++ b/DiscImageChef/Commands/Statistics.cs @@ -0,0 +1,199 @@ +// /*************************************************************************** +// The Disc Image Chef +// ---------------------------------------------------------------------------- +// +// Filename : Statistics.cs +// Version : 1.0 +// Author(s) : Natalia Portillo +// +// Component : Component +// +// Revision : $Revision$ +// Last change by : $Author$ +// Date : $Date$ +// +// --[ Description ] ---------------------------------------------------------- +// +// Description +// +// --[ License ] -------------------------------------------------------------- +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as +// published by the Free Software Foundation, either version 3 of the +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +// ---------------------------------------------------------------------------- +// Copyright (C) 2011-2015 Claunia.com +// ****************************************************************************/ +// //$Id$ +using System; +using DiscImageChef.Console; + +namespace DiscImageChef.Commands +{ + public static class Statistics + { + public static void showStats() + { + if(Core.Statistics.AllStats == null) + { + DicConsole.WriteLine("There are no statistics."); + return; + } + + bool thereAreStats = false; + + if (Core.Statistics.AllStats.Commands != null) + { + DicConsole.WriteLine("Commands statistics"); + DicConsole.WriteLine("==================="); + if (Core.Statistics.AllStats.Commands.Analyze > 0) + DicConsole.WriteLine("You have called the Analyze command {0} times", Core.Statistics.AllStats.Commands.Analyze); + if (Core.Statistics.AllStats.Commands.Benchmark > 0) + DicConsole.WriteLine("You have called the Benchmark command {0} times", Core.Statistics.AllStats.Commands.Benchmark); + if (Core.Statistics.AllStats.Commands.Checksum > 0) + DicConsole.WriteLine("You have called the Checksum command {0} times", Core.Statistics.AllStats.Commands.Checksum); + if (Core.Statistics.AllStats.Commands.Compare > 0) + DicConsole.WriteLine("You have called the Compare command {0} times", Core.Statistics.AllStats.Commands.Compare); + if (Core.Statistics.AllStats.Commands.CreateSidecar > 0) + DicConsole.WriteLine("You have called the Create-Sidecar command {0} times", Core.Statistics.AllStats.Commands.CreateSidecar); + if (Core.Statistics.AllStats.Commands.Decode > 0) + DicConsole.WriteLine("You have called the Decode command {0} times", Core.Statistics.AllStats.Commands.Decode); + if (Core.Statistics.AllStats.Commands.DeviceInfo > 0) + DicConsole.WriteLine("You have called the Device-Info command {0} times", Core.Statistics.AllStats.Commands.DeviceInfo); + if (Core.Statistics.AllStats.Commands.DeviceReport > 0) + DicConsole.WriteLine("You have called the Device-Report command {0} times", Core.Statistics.AllStats.Commands.DeviceReport); + if (Core.Statistics.AllStats.Commands.DumpMedia > 0) + DicConsole.WriteLine("You have called the Dump-Media command {0} times", Core.Statistics.AllStats.Commands.DumpMedia); + if (Core.Statistics.AllStats.Commands.Entropy > 0) + DicConsole.WriteLine("You have called the Entropy command {0} times", Core.Statistics.AllStats.Commands.Entropy); + if (Core.Statistics.AllStats.Commands.Formats > 0) + DicConsole.WriteLine("You have called the Formats command {0} times", Core.Statistics.AllStats.Commands.Formats); + if (Core.Statistics.AllStats.Commands.MediaInfo > 0) + DicConsole.WriteLine("You have called the Media-Info command {0} times", Core.Statistics.AllStats.Commands.MediaInfo); + if (Core.Statistics.AllStats.Commands.MediaScan > 0) + DicConsole.WriteLine("You have called the Media-Scan command {0} times", Core.Statistics.AllStats.Commands.MediaScan); + if (Core.Statistics.AllStats.Commands.PrintHex > 0) + DicConsole.WriteLine("You have called the Print-Hex command {0} times", Core.Statistics.AllStats.Commands.PrintHex); + if (Core.Statistics.AllStats.Commands.Verify > 0) + DicConsole.WriteLine("You have called the Verify command {0} times", Core.Statistics.AllStats.Commands.Verify); + DicConsole.WriteLine(); + thereAreStats = true; + } + + if(Core.Statistics.AllStats.Benchmark != null) + { + DicConsole.WriteLine("Benchmark statistics"); + DicConsole.WriteLine("===================="); + foreach (Core.ChecksumStats chk in Core.Statistics.AllStats.Benchmark.Checksum) + { + DicConsole.WriteLine("Took {0} seconds to calculate {1} algorithm", chk.Value, chk.algorithm); + } + DicConsole.WriteLine("Took {0} seconds to calculate all algorithms sequentially", Core.Statistics.AllStats.Benchmark.Sequential); + DicConsole.WriteLine("Took {0} seconds to calculate all algorithms at the same time", Core.Statistics.AllStats.Benchmark.All); + DicConsole.WriteLine("Took {0} seconds to calculate entropy", Core.Statistics.AllStats.Benchmark.Entropy); + DicConsole.WriteLine("Used a maximum of {0} bytes of memory", Core.Statistics.AllStats.Benchmark.MaxMemory); + DicConsole.WriteLine("Used a minimum of {0} bytes of memory", Core.Statistics.AllStats.Benchmark.MinMemory); + DicConsole.WriteLine(); + thereAreStats = true; + } + + if (Core.Statistics.AllStats.MediaImages != null && Core.Statistics.AllStats.MediaImages.Count > 0) + { + DicConsole.WriteLine("Media image statistics"); + DicConsole.WriteLine("======================"); + foreach (Core.NameValueStats nvs in Core.Statistics.AllStats.MediaImages) + DicConsole.WriteLine("Format {0} has been found {1} times.", nvs.name, nvs.Value); + DicConsole.WriteLine(); + thereAreStats = true; + } + + if (Core.Statistics.AllStats.Partitions != null && Core.Statistics.AllStats.Partitions.Count > 0) + { + DicConsole.WriteLine("Partition statistics"); + DicConsole.WriteLine("===================="); + foreach (Core.NameValueStats nvs in Core.Statistics.AllStats.Partitions) + DicConsole.WriteLine("Partitioning scheme {0} has been found {1} times.", nvs.name, nvs.Value); + DicConsole.WriteLine(); + thereAreStats = true; + } + + if (Core.Statistics.AllStats.Filesystems != null && Core.Statistics.AllStats.Filesystems.Count > 0) + { + DicConsole.WriteLine("Filesystem statistics"); + DicConsole.WriteLine("====================="); + foreach (Core.NameValueStats nvs in Core.Statistics.AllStats.Filesystems) + DicConsole.WriteLine("Filesystem {0} has been found {1} times.", nvs.name, nvs.Value); + DicConsole.WriteLine(); + thereAreStats = true; + } + + if (Core.Statistics.AllStats.Devices != null && Core.Statistics.AllStats.Devices.Count > 0) + { + DicConsole.WriteLine("Device statistics"); + DicConsole.WriteLine("================="); + foreach (Core.DeviceStats ds in Core.Statistics.AllStats.Devices) + DicConsole.WriteLine("Device model {0}, manufactured by {1}, with revision {2} and attached via {3}.", ds.Model, ds.Manufacturer, ds.Revision, ds.Bus); + DicConsole.WriteLine(); + thereAreStats = true; + } + + if (Core.Statistics.AllStats.Medias != null && Core.Statistics.AllStats.Medias.Count > 0) + { + DicConsole.WriteLine("Media statistics"); + DicConsole.WriteLine("================"); + foreach (Core.MediaStats ms in Core.Statistics.AllStats.Medias) + { + if (ms.real) + DicConsole.WriteLine("Media type {0} has been found {1} times in a real device.", ms.type, ms.Value); + else + DicConsole.WriteLine("Media type {0} has been found {1} times in a media image.", ms.type, ms.Value); + } + DicConsole.WriteLine(); + thereAreStats = true; + } + + if (Core.Statistics.AllStats.MediaScan != null) + { + DicConsole.WriteLine("Media scan statistics"); + DicConsole.WriteLine("====================="); + DicConsole.WriteLine("Scanned a total of {0} sectors", Core.Statistics.AllStats.MediaScan.Sectors.Total); + DicConsole.WriteLine("{0} of them correctly", Core.Statistics.AllStats.MediaScan.Sectors.Correct); + DicConsole.WriteLine("{0} of them had errors", Core.Statistics.AllStats.MediaScan.Sectors.Error); + DicConsole.WriteLine("{0} of them took less than 3 ms", Core.Statistics.AllStats.MediaScan.Times.LessThan3ms); + DicConsole.WriteLine("{0} of them took less than 10 ms but more than 3 ms", Core.Statistics.AllStats.MediaScan.Times.LessThan10ms); + DicConsole.WriteLine("{0} of them took less than 50 ms but more than 10 ms", Core.Statistics.AllStats.MediaScan.Times.LessThan50ms); + DicConsole.WriteLine("{0} of them took less than 150 ms but more than 50 ms", Core.Statistics.AllStats.MediaScan.Times.LessThan150ms); + DicConsole.WriteLine("{0} of them took less than 500 ms but more than 150 ms", Core.Statistics.AllStats.MediaScan.Times.LessThan500ms); + DicConsole.WriteLine("{0} of them took less than more than 500 ms", Core.Statistics.AllStats.MediaScan.Times.MoreThan500ms); + thereAreStats = true; + } + + if (Core.Statistics.AllStats.Verify != null) + { + DicConsole.WriteLine("Verification statistics"); + DicConsole.WriteLine("======================="); + DicConsole.WriteLine("{0} media images has been correctly verified", Core.Statistics.AllStats.Verify.MediaImages.Correct); + DicConsole.WriteLine("{0} media images has been determined as containing errors", Core.Statistics.AllStats.Verify.MediaImages.Failed); + DicConsole.WriteLine("{0} sectors has been verified", Core.Statistics.AllStats.Verify.Sectors.Total); + DicConsole.WriteLine("{0} sectors has been determined correct", Core.Statistics.AllStats.Verify.Sectors.Correct); + DicConsole.WriteLine("{0} sectors has been determined to contain errors", Core.Statistics.AllStats.Verify.Sectors.Error); + DicConsole.WriteLine("{0} sectors could not be determined as correct or not", Core.Statistics.AllStats.Verify.Sectors.Unverifiable); + thereAreStats = true; + } + + if (!thereAreStats) + DicConsole.WriteLine("There are no statistics."); + } + } +} + diff --git a/DiscImageChef/Commands/Verify.cs b/DiscImageChef/Commands/Verify.cs index ec6c4c87..847808b4 100644 --- a/DiscImageChef/Commands/Verify.cs +++ b/DiscImageChef/Commands/Verify.cs @@ -61,6 +61,14 @@ namespace DiscImageChef.Commands } inputFormat.OpenImage(options.InputFile); + Core.Statistics.AddMediaFormat(inputFormat.GetImageFormat()); + Core.Statistics.AddMedia(inputFormat.ImageInfo.mediaType, false); + + bool? correctDisc = null; + long totalSectors = 0; + long errorSectors = 0; + long correctSectors = 0; + long unknownSectors = 0; if (options.VerifyDisc) { @@ -83,6 +91,7 @@ namespace DiscImageChef.Commands break; } + correctDisc = discCheckStatus; DicConsole.VerboseWriteLine("Checking disc image checksums took {0} seconds", CheckTime.TotalSeconds); } @@ -253,7 +262,15 @@ namespace DiscImageChef.Commands DicConsole.WriteLine("Total errors............ {0}", FailingLBAs.Count); DicConsole.WriteLine("Total unknowns.......... {0}", UnknownLBAs.Count); DicConsole.WriteLine("Total errors+unknowns... {0}", FailingLBAs.Count + UnknownLBAs.Count); + + totalSectors = (long)inputFormat.GetSectors(); + errorSectors = FailingLBAs.Count; + unknownSectors = UnknownLBAs.Count; + correctSectors = totalSectors - errorSectors - unknownSectors; } + + Core.Statistics.AddCommand("verify"); + Core.Statistics.AddVerify(correctDisc, correctSectors, errorSectors, unknownSectors, totalSectors); } } } diff --git a/DiscImageChef/Core/Statistics.cs b/DiscImageChef/Core/Statistics.cs new file mode 100644 index 00000000..b7fcce0c --- /dev/null +++ b/DiscImageChef/Core/Statistics.cs @@ -0,0 +1,725 @@ +// /*************************************************************************** +// The Disc Image Chef +// ---------------------------------------------------------------------------- +// +// Filename : Statistics.cs +// Version : 1.0 +// Author(s) : Natalia Portillo +// +// Component : Component +// +// Revision : $Revision$ +// Last change by : $Author$ +// Date : $Date$ +// +// --[ Description ] ---------------------------------------------------------- +// +// Description +// +// --[ License ] -------------------------------------------------------------- +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as +// published by the Free Software Foundation, either version 3 of the +// License, or(at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +// ---------------------------------------------------------------------------- +// Copyright(C) 2011-2015 Claunia.com +// ****************************************************************************/ +// //$Id$ +using System; +using System.Collections.Generic; +using System.IO; +using System.Xml.Serialization; + +namespace DiscImageChef.Core +{ + [XmlRoot("DicStats", Namespace = "", IsNullable = false)] + public class Stats + { + public CommandsStats Commands; + [XmlArrayItem("Filesystem")] + public List Filesystems; + [XmlArrayItem("Scheme")] + public List Partitions; + [XmlArrayItem("Format")] + public List MediaImages; + [XmlArrayItem("Device", IsNullable = true)] + public List Devices; + [XmlArrayItem("Media")] + public List Medias; + public BenchmarkStats Benchmark; + public MediaScanStats MediaScan; + public VerifyStats Verify; + } + + public class CommandsStats + { + public long Analyze; + public long Benchmark; + public long Checksum; + public long Compare; + public long CreateSidecar; + public long Decode; + public long DeviceInfo; + public long DeviceReport; + public long DumpMedia; + public long Entropy; + public long Formats; + public long MediaInfo; + public long MediaScan; + public long PrintHex; + public long Verify; + } + + public class VerifiedItems + { + public long Correct; + public long Failed; + } + + public class VerifyStats + { + public VerifiedItems MediaImages; + public ScannedSectors Sectors; + } + + public class ScannedSectors + { + public long Total; + public long Error; + public long Correct; + public long Unverifiable; + } + + public class TimeStats + { + public long LessThan3ms; + public long LessThan10ms; + public long LessThan50ms; + public long LessThan150ms; + public long LessThan500ms; + public long MoreThan500ms; + } + + public class MediaScanStats + { + public ScannedSectors Sectors; + public TimeStats Times; + } + + public class ChecksumStats + { + [XmlAttribute] + public string algorithm; + [XmlText] + public double Value; + } + + public class BenchmarkStats + { + [XmlElement("Checksum")] + public List Checksum; + public double Entropy; + public double All; + public double Sequential; + public long MaxMemory; + public long MinMemory; + } + + public class MediaStats + { + [XmlAttribute] + public bool real; + [XmlAttribute] + public string type; + [XmlText] + public long Value; + } + + public class DeviceStats + { + public string Manufacturer; + public string Model; + public string Revision; + public string Bus; + + [XmlIgnore] + public bool ManufacturerSpecified; + } + + public class NameValueStats + { + [XmlAttribute] + public string name; + [XmlText] + public long Value; + } + + public static class Statistics + { + public static Stats AllStats; + public static Stats CurrentStats; + + public static void LoadStats() + { + if (File.Exists(Path.Combine(Settings.Settings.StatsPath, "Statistics.xml"))) + { + AllStats = new Stats(); + CurrentStats = new Stats(); + + XmlSerializer xs = new XmlSerializer(AllStats.GetType()); + StreamReader sr = new StreamReader(Path.Combine(Settings.Settings.StatsPath, "Statistics.xml")); + AllStats = (Stats)xs.Deserialize(sr); + sr.Close(); + } + else if (Settings.Settings.Current.Stats != null) + { + AllStats = new Stats(); + CurrentStats = new Stats(); + } + else + { + AllStats = null; + CurrentStats = null; + } + } + + public static void SaveStats() + { + if (AllStats != null) + { + FileStream fs = new FileStream(Path.Combine(Settings.Settings.StatsPath, "Statistics.xml"), FileMode.Create); + XmlSerializer xs = new XmlSerializer(AllStats.GetType()); + xs.Serialize(fs, AllStats); + fs.Close(); + + if (CurrentStats != null) + { + string partial = string.Format("PartialStats_{0:yyyyMMddHHmmssfff}.xml", DateTime.UtcNow); + + fs = new FileStream(Path.Combine(Settings.Settings.StatsPath, partial), FileMode.Create); + xs = new XmlSerializer(CurrentStats.GetType()); + xs.Serialize(fs, CurrentStats); + fs.Close(); + } + + if (Settings.Settings.Current.Stats.ShareStats) + SubmitStats(); + } + } + + public static void SubmitStats() + { + // TODO: Implement it + } + + public static void AddCommand(string command) + { + if (Settings.Settings.Current.Stats != null && Settings.Settings.Current.Stats.DeviceStats) + { + if (AllStats.Commands == null) + AllStats.Commands = new CommandsStats(); + + if (CurrentStats.Commands == null) + CurrentStats.Commands = new CommandsStats(); + + switch (command) + { + case "analyze": + AllStats.Commands.Analyze++; + CurrentStats.Commands.Analyze++; + break; + case "benchmark": + AllStats.Commands.Benchmark++; + CurrentStats.Commands.Benchmark++; + break; + case "checksum": + AllStats.Commands.Checksum++; + CurrentStats.Commands.Checksum++; + break; + case "compare": + AllStats.Commands.Compare++; + CurrentStats.Commands.Compare++; + break; + case "create-sidecar": + AllStats.Commands.CreateSidecar++; + CurrentStats.Commands.CreateSidecar++; + break; + case "decode": + AllStats.Commands.Decode++; + CurrentStats.Commands.Decode++; + break; + case "device-info": + AllStats.Commands.DeviceInfo++; + CurrentStats.Commands.DeviceInfo++; + break; + case "device-report": + AllStats.Commands.DeviceReport++; + CurrentStats.Commands.DeviceReport++; + break; + case "dump-media": + AllStats.Commands.DumpMedia++; + CurrentStats.Commands.DumpMedia++; + break; + case "entropy": + AllStats.Commands.Entropy++; + CurrentStats.Commands.Entropy++; + break; + case "formats": + AllStats.Commands.Formats++; + CurrentStats.Commands.Formats++; + break; + case "media-info": + AllStats.Commands.MediaInfo++; + CurrentStats.Commands.MediaInfo++; + break; + case "media-scan": + AllStats.Commands.MediaScan++; + CurrentStats.Commands.MediaScan++; + break; + case "print-hex": + AllStats.Commands.PrintHex++; + CurrentStats.Commands.PrintHex++; + break; + case "verify": + AllStats.Commands.Verify++; + CurrentStats.Commands.Verify++; + break; + } + } + } + + public static void AddFilesystem(string filesystem) + { + if (Settings.Settings.Current.Stats != null && Settings.Settings.Current.Stats.FilesystemStats) + { + if (AllStats.Filesystems == null) + AllStats.Filesystems = new List(); + if (CurrentStats.Filesystems == null) + CurrentStats.Filesystems = new List(); + + NameValueStats old = null; + foreach (NameValueStats nvs in AllStats.Filesystems) + { + if (nvs.name == filesystem) + { + old = nvs; + break; + } + } + + NameValueStats nw = new NameValueStats(); + if (old != null) + { + nw.name = old.name; + nw.Value = old.Value + 1; + AllStats.Filesystems.Remove(old); + } + else + { + nw.name = filesystem; + nw.Value = 1; + } + AllStats.Filesystems.Add(nw); + + old = null; + foreach (NameValueStats nvs in CurrentStats.Filesystems) + { + if (nvs.name == filesystem) + { + old = nvs; + break; + } + } + + nw = new NameValueStats(); + if (old != null) + { + nw.name = old.name; + nw.Value = old.Value + 1; + CurrentStats.Filesystems.Remove(old); + } + else + { + nw.name = filesystem; + nw.Value = 1; + } + CurrentStats.Filesystems.Add(nw); + } + } + + public static void AddPartition(string partition) + { + if (Settings.Settings.Current.Stats != null && Settings.Settings.Current.Stats.PartitionStats) + { + if (AllStats.Partitions == null) + AllStats.Partitions = new List(); + if (CurrentStats.Partitions == null) + CurrentStats.Partitions = new List(); + + NameValueStats old = null; + foreach (NameValueStats nvs in AllStats.Partitions) + { + if (nvs.name == partition) + { + old = nvs; + break; + } + } + + NameValueStats nw = new NameValueStats(); + if (old != null) + { + nw.name = old.name; + nw.Value = old.Value + 1; + AllStats.Partitions.Remove(old); + } + else + { + nw.name = partition; + nw.Value = 1; + } + AllStats.Partitions.Add(nw); + + old = null; + foreach (NameValueStats nvs in CurrentStats.Partitions) + { + if (nvs.name == partition) + { + old = nvs; + break; + } + } + + nw = new NameValueStats(); + if (old != null) + { + nw.name = old.name; + nw.Value = old.Value + 1; + CurrentStats.Partitions.Remove(old); + } + else + { + nw.name = partition; + nw.Value = 1; + } + CurrentStats.Partitions.Add(nw); + } + } + + public static void AddMediaFormat(string format) + { + if (Settings.Settings.Current.Stats != null && Settings.Settings.Current.Stats.MediaImageStats) + { + if (AllStats.MediaImages == null) + AllStats.MediaImages = new List(); + if (CurrentStats.MediaImages == null) + CurrentStats.MediaImages = new List(); + + NameValueStats old = null; + foreach (NameValueStats nvs in AllStats.MediaImages) + { + if (nvs.name == format) + { + old = nvs; + break; + } + } + + NameValueStats nw = new NameValueStats(); + if (old != null) + { + nw.name = old.name; + nw.Value = old.Value + 1; + AllStats.MediaImages.Remove(old); + } + else + { + nw.name = format; + nw.Value = 1; + } + AllStats.MediaImages.Add(nw); + + old = null; + foreach (NameValueStats nvs in CurrentStats.MediaImages) + { + if (nvs.name == format) + { + old = nvs; + break; + } + } + + nw = new NameValueStats(); + if (old != null) + { + nw.name = old.name; + nw.Value = old.Value + 1; + CurrentStats.MediaImages.Remove(old); + } + else + { + nw.name = format; + nw.Value = 1; + } + CurrentStats.MediaImages.Add(nw); + } + } + + public static void AddDevice(Devices.Device dev) + { + if (Settings.Settings.Current.Stats != null && Settings.Settings.Current.Stats.DeviceStats) + { + if (AllStats.Devices == null) + AllStats.Devices = new List(); + if (CurrentStats.Devices == null) + CurrentStats.Devices = new List(); + + string deviceBus; + if (dev.IsUSB) + deviceBus = "USB"; + else if (dev.IsFireWire) + deviceBus = "FireWire"; + else + deviceBus = dev.Type.ToString(); + + DeviceStats old = null; + foreach (DeviceStats ds in AllStats.Devices) + { + if (ds.Manufacturer == dev.Manufacturer && + ds.Model == dev.Model && + ds.Revision == dev.Revision && + ds.Bus == deviceBus) + { + old = ds; + break; + } + } + + if (old != null) + AllStats.Devices.Remove(old); + + DeviceStats nw = new DeviceStats(); + nw.Model = dev.Model; + nw.Manufacturer = dev.Manufacturer; + nw.Revision = dev.Revision; + nw.Bus = deviceBus; + nw.ManufacturerSpecified = true; + AllStats.Devices.Add(nw); + + old = null; + foreach (DeviceStats ds in CurrentStats.Devices) + { + if (ds.Manufacturer == dev.Manufacturer && + ds.Model == dev.Model && + ds.Revision == dev.Revision && + ds.Bus == deviceBus) + { + old = ds; + break; + } + } + + if (old != null) + CurrentStats.Devices.Remove(old); + + nw = new DeviceStats(); + nw.Model = dev.Model; + nw.Manufacturer = dev.Manufacturer; + nw.Revision = dev.Revision; + nw.Bus = deviceBus; + nw.ManufacturerSpecified = true; + CurrentStats.Devices.Add(nw); + } + } + + public static void AddMedia(CommonTypes.MediaType type, bool real) + { + if (Settings.Settings.Current.Stats != null && Settings.Settings.Current.Stats.MediaStats) + { + if (AllStats.Medias == null) + AllStats.Medias = new List(); + if (CurrentStats.Medias == null) + CurrentStats.Medias = new List(); + + MediaStats old = null; + foreach (MediaStats ms in AllStats.Medias) + { + if (ms.real == real && ms.type == type.ToString()) + { + old = ms; + break; + } + } + + MediaStats nw = new MediaStats(); + if (old != null) + { + nw.type = old.type; + nw.real = old.real; + nw.Value = old.Value + 1; + AllStats.Medias.Remove(old); + } + else + { + nw.type = type.ToString(); + nw.real = real; + nw.Value = 1; + } + AllStats.Medias.Add(nw); + + old = null; + foreach (MediaStats ms in CurrentStats.Medias) + { + if (ms.real == real && ms.type == type.ToString()) + { + old = ms; + break; + } + } + + nw = new MediaStats(); + if (old != null) + { + nw.type = old.type; + nw.real = old.real; + nw.Value = old.Value + 1; + CurrentStats.Medias.Remove(old); + } + else + { + nw.type = type.ToString(); + nw.real = real; + nw.Value = 1; + } + CurrentStats.Medias.Add(nw); + } + } + + public static void AddBenchmark(Dictionary checksums, double entropy, double all, double sequential, long maxMemory, long minMemory) + { + if (Settings.Settings.Current.Stats != null && Settings.Settings.Current.Stats.BenchmarkStats) + { + CurrentStats.Benchmark = new BenchmarkStats(); + CurrentStats.Benchmark.Checksum = new List(); + AllStats.Benchmark = new BenchmarkStats(); + AllStats.Benchmark.Checksum = new List(); + + foreach (KeyValuePair kvp in checksums) + { + ChecksumStats st = new ChecksumStats(); + st.algorithm = kvp.Key; + st.Value = kvp.Value; + CurrentStats.Benchmark.Checksum.Add(st); + AllStats.Benchmark.Checksum.Add(st); + } + + CurrentStats.Benchmark.All = all; + CurrentStats.Benchmark.Entropy = entropy; + CurrentStats.Benchmark.MaxMemory = maxMemory; + CurrentStats.Benchmark.MinMemory = minMemory; + CurrentStats.Benchmark.Sequential = sequential; + + AllStats.Benchmark.All = all; + AllStats.Benchmark.Entropy = entropy; + AllStats.Benchmark.MaxMemory = maxMemory; + AllStats.Benchmark.MinMemory = minMemory; + AllStats.Benchmark.Sequential = sequential; + } + } + + public static void AddVerify(bool? mediaVerified, long correct, long failed, long unknown, long total) + { + if (Settings.Settings.Current.Stats != null && Settings.Settings.Current.Stats.VerifyStats) + { + if (CurrentStats.Verify == null) + { + CurrentStats.Verify = new VerifyStats(); + CurrentStats.Verify.MediaImages = new VerifiedItems(); + CurrentStats.Verify.Sectors = new ScannedSectors(); + } + + if (AllStats.Verify == null) + { + AllStats.Verify = new VerifyStats(); + AllStats.Verify.MediaImages = new VerifiedItems(); + AllStats.Verify.Sectors = new ScannedSectors(); + } + + if (mediaVerified.HasValue) + { + if (mediaVerified.Value) + { + CurrentStats.Verify.MediaImages.Correct++; + AllStats.Verify.MediaImages.Correct++; + } + else + { + CurrentStats.Verify.MediaImages.Failed++; + AllStats.Verify.MediaImages.Failed++; + } + } + + CurrentStats.Verify.Sectors.Correct += correct; + CurrentStats.Verify.Sectors.Error += failed; + CurrentStats.Verify.Sectors.Unverifiable += unknown; + CurrentStats.Verify.Sectors.Total += total; + + AllStats.Verify.Sectors.Correct += correct; + AllStats.Verify.Sectors.Error += failed; + AllStats.Verify.Sectors.Unverifiable += unknown; + AllStats.Verify.Sectors.Total += total; + } + } + + public static void AddMediaScan(long lessThan3ms, long lessThan10ms, long lessThan50ms, long lessThan150ms, long lessThan500ms, long moreThan500ms, long total, long error, long correct) + { + if (Settings.Settings.Current.Stats != null && Settings.Settings.Current.Stats.MediaScanStats) + { + if (CurrentStats.MediaScan == null) + { + CurrentStats.MediaScan = new MediaScanStats(); + CurrentStats.MediaScan.Sectors = new ScannedSectors(); + CurrentStats.MediaScan.Times = new TimeStats(); + } + + if (AllStats.MediaScan == null) + { + AllStats.MediaScan = new MediaScanStats(); + AllStats.MediaScan.Sectors = new ScannedSectors(); + AllStats.MediaScan.Times = new TimeStats(); + } + + CurrentStats.MediaScan.Sectors.Correct += correct; + CurrentStats.MediaScan.Sectors.Error += error; + CurrentStats.MediaScan.Sectors.Total += total; + CurrentStats.MediaScan.Times.LessThan3ms += lessThan3ms; + CurrentStats.MediaScan.Times.LessThan10ms += lessThan10ms; + CurrentStats.MediaScan.Times.LessThan50ms += lessThan50ms; + CurrentStats.MediaScan.Times.LessThan150ms += lessThan150ms; + CurrentStats.MediaScan.Times.LessThan500ms += lessThan500ms; + CurrentStats.MediaScan.Times.MoreThan500ms += moreThan500ms; + + AllStats.MediaScan.Sectors.Correct += correct; + AllStats.MediaScan.Sectors.Error += error; + AllStats.MediaScan.Sectors.Total += total; + AllStats.MediaScan.Times.LessThan3ms += lessThan3ms; + AllStats.MediaScan.Times.LessThan10ms += lessThan10ms; + AllStats.MediaScan.Times.LessThan50ms += lessThan50ms; + AllStats.MediaScan.Times.LessThan150ms += lessThan150ms; + AllStats.MediaScan.Times.LessThan500ms += lessThan500ms; + AllStats.MediaScan.Times.MoreThan500ms += moreThan500ms; + } + } + } +} + diff --git a/DiscImageChef/DiscImageChef.csproj b/DiscImageChef/DiscImageChef.csproj index 0dc119cf..23ed45ea 100644 --- a/DiscImageChef/DiscImageChef.csproj +++ b/DiscImageChef/DiscImageChef.csproj @@ -61,6 +61,9 @@ + + + @@ -72,14 +75,14 @@ - + - + @@ -201,5 +204,9 @@ {9F213318-5CB8-4066-A757-074489C9F818} DiscImageChef.Metadata + + {5C4C7BAA-CF60-4233-84ED-39CB2312AF38} + DiscImageChef.Settings + \ No newline at end of file diff --git a/DiscImageChef/Main.cs b/DiscImageChef/Main.cs index f33217f0..0e81f791 100644 --- a/DiscImageChef/Main.cs +++ b/DiscImageChef/Main.cs @@ -37,12 +37,9 @@ Copyright (C) 2011-2014 Claunia.com //$Id$ using System; -using System.Collections.Generic; -using DiscImageChef.ImagePlugins; -using DiscImageChef.PartPlugins; -using DiscImageChef.Plugins; using System.Reflection; using DiscImageChef.Console; +using DiscImageChef.Settings; namespace DiscImageChef { @@ -80,6 +77,9 @@ namespace DiscImageChef DicConsole.WriteLine("{0}", AssemblyCopyright); DicConsole.WriteLine(); + Settings.Settings.LoadSettings(); + Core.Statistics.LoadStats(); + switch (invokedVerb) { case "analyze": @@ -202,9 +202,17 @@ namespace DiscImageChef DicConsole.VerboseWriteLineEvent += System.Console.WriteLine; Commands.DeviceReport.doDeviceReport(DeviceReportOptions); break; + case "configure": + Commands.Configure.doConfigure (); + break; + case "stats": + Commands.Statistics.showStats (); + break; default: throw new ArgumentException("Should never arrive here!"); } + + Core.Statistics.SaveStats(); } } } diff --git a/DiscImageChef/Options.cs b/DiscImageChef/Options.cs index 0afc0eb9..8908bec7 100644 --- a/DiscImageChef/Options.cs +++ b/DiscImageChef/Options.cs @@ -295,6 +295,14 @@ namespace DiscImageChef public string DevicePath { get; set; } } + public class ConfigureSubOptions : CommonSubOptions + { + } + + public class StatsSubOptions : CommonSubOptions + { + } + public class Options { public Options() @@ -314,6 +322,8 @@ namespace DiscImageChef MediaScanVerb = new MediaScanSubOptions(); DumpMediaVerb = new DumpMediaSubOptions(); DeviceReportVerb = new DeviceReportSubOptions(); + ConfigureVerb = new ConfigureSubOptions(); + StatsVerb = new StatsSubOptions(); } [VerbOption("analyze", HelpText = "Analyzes a disc image and searches for partitions and/or filesystems.")] @@ -361,6 +371,12 @@ namespace DiscImageChef [VerbOption("device-report", HelpText = "Tests the device capabilities and creates an XML report of them.")] public DeviceReportSubOptions DeviceReportVerb { get; set; } + [VerbOption("configure", HelpText = "Configures user settings and statistics.")] + public ConfigureSubOptions ConfigureVerb { get; set; } + + [VerbOption("stats", HelpText = "Shows statistics.")] + public StatsSubOptions StatsVerb { get; set; } + [HelpVerbOption] public string DoHelpForVerb(string verbName) {