Moved version from Core to Interop.

This commit is contained in:
2017-12-29 01:26:58 +00:00
parent b066a4ade7
commit cfee0226dd
8 changed files with 322 additions and 275 deletions

View File

@@ -162,7 +162,6 @@
<e p="Sidecar.cs" t="Include" /> <e p="Sidecar.cs" t="Include" />
</e> </e>
<e p="Statistics.cs" t="Include" /> <e p="Statistics.cs" t="Include" />
<e p="Version.cs" t="Include" />
<e p="bin" t="ExcludeRecursive" /> <e p="bin" t="ExcludeRecursive" />
<e p="obj" t="ExcludeRecursive" /> <e p="obj" t="ExcludeRecursive" />
<e p="packages.config" t="Include" /> <e p="packages.config" t="Include" />
@@ -665,6 +664,7 @@
<e p="Properties" t="Include"> <e p="Properties" t="Include">
<e p="AssemblyInfo.cs" t="Include" /> <e p="AssemblyInfo.cs" t="Include" />
</e> </e>
<e p="Version.cs" t="Include" />
<e p="bin" t="ExcludeRecursive" /> <e p="bin" t="ExcludeRecursive" />
<e p="obj" t="ExcludeRecursive" /> <e p="obj" t="ExcludeRecursive" />
</e> </e>

View File

@@ -36,6 +36,7 @@ using DiscImageChef.Metadata;
using Extents; using Extents;
using Schemas; using Schemas;
using PlatformID = DiscImageChef.Interop.PlatformID; using PlatformID = DiscImageChef.Interop.PlatformID;
using Version = DiscImageChef.Interop.Version;
namespace DiscImageChef.Core.Devices.Dumping namespace DiscImageChef.Core.Devices.Dumping
{ {
@@ -62,9 +63,11 @@ namespace DiscImageChef.Core.Devices.Dumping
/// If the provided resume does not correspond with the current in /// If the provided resume does not correspond with the current in
/// progress dump /// progress dump
/// </exception> /// </exception>
internal static void Process(bool isLba, bool removable, ulong blocks, string manufacturer, string model, internal static void Process(bool isLba, bool removable, ulong blocks,
string manufacturer, string model,
string serial, PlatformID platform, ref Resume resume, string serial, PlatformID platform, ref Resume resume,
ref DumpHardwareType currentTry, ref ExtentsULong extents) ref DumpHardwareType currentTry,
ref ExtentsULong extents)
{ {
if(resume != null) if(resume != null)
{ {

View File

@@ -43,6 +43,7 @@ using DiscImageChef.Devices;
using DiscImageChef.Metadata; using DiscImageChef.Metadata;
using Schemas; using Schemas;
using MediaType = DiscImageChef.CommonTypes.MediaType; using MediaType = DiscImageChef.CommonTypes.MediaType;
using Version = DiscImageChef.Interop.Version;
namespace DiscImageChef.Core.Devices.Dumping namespace DiscImageChef.Core.Devices.Dumping
{ {
@@ -58,7 +59,8 @@ namespace DiscImageChef.Core.Devices.Dumping
/// <param name="dumpLog">Dump logger</param> /// <param name="dumpLog">Dump logger</param>
/// <param name="sidecar">Partially filled initialized sidecar</param> /// <param name="sidecar">Partially filled initialized sidecar</param>
internal static void Dump(Device dev, string outputPrefix, string devicePath, ref CICMMetadataType sidecar, internal static void Dump(Device dev, string outputPrefix, string devicePath, ref CICMMetadataType sidecar,
ref Resume resume, ref DumpLog dumpLog) ref Resume resume,
ref DumpLog dumpLog)
{ {
FixedSense? fxSense; FixedSense? fxSense;
bool aborted; bool aborted;
@@ -136,8 +138,8 @@ namespace DiscImageChef.Core.Devices.Dumping
fxSense = Sense.DecodeFixed(senseBuf, out strSense); fxSense = Sense.DecodeFixed(senseBuf, out strSense);
if(fxSense.HasValue && (fxSense.Value.ASC == 0x20 && fxSense.Value.ASCQ != 0x00 || if(fxSense.HasValue && (fxSense.Value.ASC == 0x20 && fxSense.Value.ASCQ != 0x00 ||
fxSense.Value.ASC != 0x20 && fxSense.Value.SenseKey != SenseKeys.IllegalRequest) fxSense.Value.ASC != 0x20 &&
) fxSense.Value.SenseKey != SenseKeys.IllegalRequest))
{ {
DicConsole.ErrorWriteLine("Could not get position. Sense follows..."); DicConsole.ErrorWriteLine("Could not get position. Sense follows...");
DicConsole.ErrorWriteLine("{0}", strSense); DicConsole.ErrorWriteLine("{0}", strSense);
@@ -501,7 +503,8 @@ namespace DiscImageChef.Core.Devices.Dumping
DicConsole.WriteLine("Blocksize changed to {0} bytes at block {1}", blockSize, currentBlock); DicConsole.WriteLine("Blocksize changed to {0} bytes at block {1}", blockSize, currentBlock);
dumpLog.WriteLine("Blocksize changed to {0} bytes at block {1}", blockSize, currentBlock); dumpLog.WriteLine("Blocksize changed to {0} bytes at block {1}", blockSize, currentBlock);
sense = dev.Space(out senseBuf, SscSpaceCodes.LogicalBlock, -1, dev.Timeout, out duration); sense = dev.Space(out senseBuf, SscSpaceCodes.LogicalBlock, -1, dev.Timeout,
out duration);
totalDuration += duration; totalDuration += duration;
if(sense) if(sense)
@@ -617,6 +620,7 @@ namespace DiscImageChef.Core.Devices.Dumping
double newSpeed = blockSize / (double)1048576 / (duration / 1000); double newSpeed = blockSize / (double)1048576 / (duration / 1000);
if(!double.IsInfinity(newSpeed)) currentSpeed = newSpeed; if(!double.IsInfinity(newSpeed)) currentSpeed = newSpeed;
} }
currentBlock++; currentBlock++;
currentSize += blockSize; currentSize += blockSize;
currentFileSize += blockSize; currentFileSize += blockSize;
@@ -628,8 +632,10 @@ namespace DiscImageChef.Core.Devices.Dumping
end = DateTime.UtcNow; end = DateTime.UtcNow;
mhddLog.Close(); mhddLog.Close();
ibgLog.Close(dev, blocks, blockSize, (end - start).TotalSeconds, currentSpeed * 1024, ibgLog.Close(dev, blocks, blockSize, (end - start).TotalSeconds, currentSpeed * 1024,
blockSize * (double)(blocks + 1) / 1024 / (totalDuration / 1000), devicePath); blockSize * (double)(blocks + 1) /
dumpLog.WriteLine("Dump finished in {0} seconds.", (end - start).TotalSeconds); 1024 / (totalDuration / 1000), devicePath);
dumpLog.WriteLine("Dump finished in {0} seconds.",
(end - start).TotalSeconds);
dumpLog.WriteLine("Average dump speed {0:F3} KiB/sec.", dumpLog.WriteLine("Average dump speed {0:F3} KiB/sec.",
(double)blockSize * (double)(blocks + 1) / 1024 / (totalDuration / 1000)); (double)blockSize * (double)(blocks + 1) / 1024 / (totalDuration / 1000));
dumpLog.WriteLine("Average checksum speed {0:F3} KiB/sec.", dumpLog.WriteLine("Average checksum speed {0:F3} KiB/sec.",
@@ -656,8 +662,10 @@ namespace DiscImageChef.Core.Devices.Dumping
sidecar.BlockMedia[0].LogicalBlocks = (long)blocks; sidecar.BlockMedia[0].LogicalBlocks = (long)blocks;
sidecar.BlockMedia[0].Size = (long)currentSize; sidecar.BlockMedia[0].Size = (long)currentSize;
sidecar.BlockMedia[0].DumpHardwareArray = new DumpHardwareType[1]; sidecar.BlockMedia[0].DumpHardwareArray = new DumpHardwareType[1];
sidecar.BlockMedia[0].DumpHardwareArray[0] = new DumpHardwareType {Extents = new ExtentType[1]}; sidecar.BlockMedia[0].DumpHardwareArray[0] =
sidecar.BlockMedia[0].DumpHardwareArray[0].Extents[0] = new ExtentType {Start = 0, End = blocks - 1}; new DumpHardwareType {Extents = new ExtentType[1]};
sidecar.BlockMedia[0].DumpHardwareArray[0].Extents[0] =
new ExtentType {Start = 0, End = blocks - 1};
sidecar.BlockMedia[0].DumpHardwareArray[0].Manufacturer = dev.Manufacturer; sidecar.BlockMedia[0].DumpHardwareArray[0].Manufacturer = dev.Manufacturer;
sidecar.BlockMedia[0].DumpHardwareArray[0].Model = dev.Model; sidecar.BlockMedia[0].DumpHardwareArray[0].Model = dev.Model;
sidecar.BlockMedia[0].DumpHardwareArray[0].Revision = dev.Revision; sidecar.BlockMedia[0].DumpHardwareArray[0].Revision = dev.Revision;

View File

@@ -70,7 +70,6 @@
<Compile Include="Devices\Reader.cs" /> <Compile Include="Devices\Reader.cs" />
<Compile Include="Devices\ReaderATA.cs" /> <Compile Include="Devices\ReaderATA.cs" />
<Compile Include="Devices\ReaderSCSI.cs" /> <Compile Include="Devices\ReaderSCSI.cs" />
<Compile Include="Version.cs" />
<Compile Include="Devices\Dumping\SSC.cs" /> <Compile Include="Devices\Dumping\SSC.cs" />
<Compile Include="Devices\Dumping\MMC.cs" /> <Compile Include="Devices\Dumping\MMC.cs" />
<Compile Include="Devices\Dumping\CompactDisc.cs" /> <Compile Include="Devices\Dumping\CompactDisc.cs" />

View File

@@ -36,6 +36,7 @@ using System.Reflection;
using DiscImageChef.Devices; using DiscImageChef.Devices;
using DiscImageChef.Interop; using DiscImageChef.Interop;
using PlatformID = DiscImageChef.Interop.PlatformID; using PlatformID = DiscImageChef.Interop.PlatformID;
using Version = DiscImageChef.Interop.Version;
namespace DiscImageChef.Core.Logging namespace DiscImageChef.Core.Logging
{ {
@@ -75,6 +76,7 @@ namespace DiscImageChef.Core.Logging
logSw.WriteLine("Mono {0}", monoVer); logSw.WriteLine("Mono {0}", monoVer);
} }
else logSw.WriteLine(".NET Framework {0}", Environment.Version); else logSw.WriteLine(".NET Framework {0}", Environment.Version);
logSw.WriteLine(); logSw.WriteLine();
logSw.WriteLine("################# Program information ################"); logSw.WriteLine("################# Program information ################");
@@ -104,6 +106,7 @@ namespace DiscImageChef.Core.Logging
logSw.WriteLine("USB vendor ID: {0:X4}h", dev.UsbVendorId); logSw.WriteLine("USB vendor ID: {0:X4}h", dev.UsbVendorId);
logSw.WriteLine("USB product ID: {0:X4}h", dev.UsbProductId); logSw.WriteLine("USB product ID: {0:X4}h", dev.UsbProductId);
} }
logSw.WriteLine("FireWire device: {0}", dev.IsFireWire); logSw.WriteLine("FireWire device: {0}", dev.IsFireWire);
if(dev.IsFireWire) if(dev.IsFireWire)
{ {
@@ -113,6 +116,7 @@ namespace DiscImageChef.Core.Logging
logSw.WriteLine("FireWire vendor ID: 0x{0:X8}", dev.FireWireVendor); logSw.WriteLine("FireWire vendor ID: 0x{0:X8}", dev.FireWireVendor);
logSw.WriteLine("FireWire product ID: 0x{0:X8}", dev.FireWireModel); logSw.WriteLine("FireWire product ID: 0x{0:X8}", dev.FireWireModel);
} }
logSw.WriteLine(); logSw.WriteLine();
logSw.WriteLine("######################################################"); logSw.WriteLine("######################################################");

View File

@@ -41,6 +41,7 @@ using DiscImageChef.Devices;
using DiscImageChef.Interop; using DiscImageChef.Interop;
using DiscImageChef.Metadata; using DiscImageChef.Metadata;
using MediaType = DiscImageChef.CommonTypes.MediaType; using MediaType = DiscImageChef.CommonTypes.MediaType;
using Version = DiscImageChef.Interop.Version;
namespace DiscImageChef.Core namespace DiscImageChef.Core
{ {
@@ -126,8 +127,9 @@ namespace DiscImageChef.Core
long count = 0; long count = 0;
OsStats old = null; OsStats old = null;
foreach(OsStats nvs in foreach(OsStats nvs in AllStats.OperatingSystems.Where(nvs =>
AllStats.OperatingSystems.Where(nvs => nvs.name == DetectOS.GetRealPlatformID().ToString() && nvs.name == DetectOS
.GetRealPlatformID().ToString() &&
nvs.version == DetectOS.GetVersion())) nvs.version == DetectOS.GetVersion()))
{ {
count = nvs.Value + 1; count = nvs.Value + 1;
@@ -145,7 +147,8 @@ namespace DiscImageChef.Core
version = DetectOS.GetVersion() version = DetectOS.GetVersion()
}); });
} }
else if(CurrentStats != null) AllStats.OperatingSystems = CurrentStats.OperatingSystems; else if(CurrentStats != null)
AllStats.OperatingSystems = CurrentStats.OperatingSystems;
if(AllStats.Versions != null) if(AllStats.Versions != null)
{ {
@@ -164,7 +167,8 @@ namespace DiscImageChef.Core
count++; count++;
AllStats.Versions.Add(new NameValueStats {name = Version.GetVersion(), Value = count}); AllStats.Versions.Add(new NameValueStats {name = Version.GetVersion(), Value = count});
} }
else if(CurrentStats != null) AllStats.Versions = CurrentStats.Versions; else if(CurrentStats != null)
AllStats.Versions = CurrentStats.Versions;
FileStream fs = new FileStream(Path.Combine(Settings.Settings.StatsPath, "Statistics.xml"), FileStream fs = new FileStream(Path.Combine(Settings.Settings.StatsPath, "Statistics.xml"),
FileMode.Create); FileMode.Create);
@@ -219,7 +223,8 @@ namespace DiscImageChef.Core
xs.Deserialize(fs); // Just to test validity of stats file xs.Deserialize(fs); // Just to test validity of stats file
fs.Seek(0, SeekOrigin.Begin); fs.Seek(0, SeekOrigin.Begin);
WebRequest request = WebRequest.Create("http://discimagechef.claunia.com/api/uploadstats"); WebRequest request =
WebRequest.Create("http://discimagechef.claunia.com/api/uploadstats");
((HttpWebRequest)request).UserAgent = ((HttpWebRequest)request).UserAgent =
$"DiscImageChef {typeof(Version).Assembly.GetName().Version}"; $"DiscImageChef {typeof(Version).Assembly.GetName().Version}";
request.Method = "POST"; request.Method = "POST";
@@ -383,6 +388,7 @@ namespace DiscImageChef.Core
nw.name = filesystem; nw.name = filesystem;
nw.Value = 1; nw.Value = 1;
} }
AllStats.Filesystems.Add(nw); AllStats.Filesystems.Add(nw);
old = CurrentStats.Filesystems.FirstOrDefault(nvs => nvs.name == filesystem); old = CurrentStats.Filesystems.FirstOrDefault(nvs => nvs.name == filesystem);
@@ -399,6 +405,7 @@ namespace DiscImageChef.Core
nw.name = filesystem; nw.name = filesystem;
nw.Value = 1; nw.Value = 1;
} }
CurrentStats.Filesystems.Add(nw); CurrentStats.Filesystems.Add(nw);
} }
@@ -427,6 +434,7 @@ namespace DiscImageChef.Core
nw.name = partition; nw.name = partition;
nw.Value = 1; nw.Value = 1;
} }
AllStats.Partitions.Add(nw); AllStats.Partitions.Add(nw);
old = CurrentStats.Partitions.FirstOrDefault(nvs => nvs.name == partition); old = CurrentStats.Partitions.FirstOrDefault(nvs => nvs.name == partition);
@@ -443,6 +451,7 @@ namespace DiscImageChef.Core
nw.name = partition; nw.name = partition;
nw.Value = 1; nw.Value = 1;
} }
CurrentStats.Partitions.Add(nw); CurrentStats.Partitions.Add(nw);
} }
@@ -471,6 +480,7 @@ namespace DiscImageChef.Core
nw.name = format; nw.name = format;
nw.Value = 1; nw.Value = 1;
} }
AllStats.Filters.Add(nw); AllStats.Filters.Add(nw);
old = CurrentStats.Filters.FirstOrDefault(nvs => nvs.name == format); old = CurrentStats.Filters.FirstOrDefault(nvs => nvs.name == format);
@@ -487,6 +497,7 @@ namespace DiscImageChef.Core
nw.name = format; nw.name = format;
nw.Value = 1; nw.Value = 1;
} }
CurrentStats.Filters.Add(nw); CurrentStats.Filters.Add(nw);
} }
@@ -515,6 +526,7 @@ namespace DiscImageChef.Core
nw.name = format; nw.name = format;
nw.Value = 1; nw.Value = 1;
} }
AllStats.MediaImages.Add(nw); AllStats.MediaImages.Add(nw);
old = CurrentStats.MediaImages.FirstOrDefault(nvs => nvs.name == format); old = CurrentStats.MediaImages.FirstOrDefault(nvs => nvs.name == format);
@@ -531,6 +543,7 @@ namespace DiscImageChef.Core
nw.name = format; nw.name = format;
nw.Value = 1; nw.Value = 1;
} }
CurrentStats.MediaImages.Add(nw); CurrentStats.MediaImages.Add(nw);
} }
@@ -547,12 +560,15 @@ namespace DiscImageChef.Core
string deviceBus; string deviceBus;
if(dev.IsUsb) deviceBus = "USB"; if(dev.IsUsb) deviceBus = "USB";
else if(dev.IsFireWire) deviceBus = "FireWire"; else if(dev.IsFireWire)
else deviceBus = dev.Type.ToString(); deviceBus = "FireWire";
else
deviceBus = dev.Type.ToString();
DeviceStats old = AllStats.Devices.FirstOrDefault(ds => ds.Manufacturer == dev.Manufacturer && DeviceStats old = AllStats.Devices.FirstOrDefault(ds => ds.Manufacturer == dev.Manufacturer &&
ds.Model == dev.Model && ds.Model == dev.Model &&
ds.Revision == dev.Revision && ds.Bus == deviceBus); ds.Revision == dev.Revision &&
ds.Bus == deviceBus);
if(old != null) AllStats.Devices.Remove(old); if(old != null) AllStats.Devices.Remove(old);
@@ -567,7 +583,8 @@ namespace DiscImageChef.Core
AllStats.Devices.Add(nw); AllStats.Devices.Add(nw);
old = CurrentStats.Devices.FirstOrDefault(ds => ds.Manufacturer == dev.Manufacturer && old = CurrentStats.Devices.FirstOrDefault(ds => ds.Manufacturer == dev.Manufacturer &&
ds.Model == dev.Model && ds.Revision == dev.Revision && ds.Model == dev.Model &&
ds.Revision == dev.Revision &&
ds.Bus == deviceBus); ds.Bus == deviceBus);
if(old != null) CurrentStats.Devices.Remove(old); if(old != null) CurrentStats.Devices.Remove(old);
@@ -611,6 +628,7 @@ namespace DiscImageChef.Core
nw.real = real; nw.real = real;
nw.Value = 1; nw.Value = 1;
} }
AllStats.Medias.Add(nw); AllStats.Medias.Add(nw);
old = CurrentStats.Medias.FirstOrDefault(ms => ms.real == real && ms.type == type.ToString()); old = CurrentStats.Medias.FirstOrDefault(ms => ms.real == real && ms.type == type.ToString());
@@ -629,6 +647,7 @@ namespace DiscImageChef.Core
nw.real = real; nw.real = real;
nw.Value = 1; nw.Value = 1;
} }
CurrentStats.Medias.Add(nw); CurrentStats.Medias.Add(nw);
} }
@@ -727,7 +746,8 @@ namespace DiscImageChef.Core
/// <param name="error">Errored sectors</param> /// <param name="error">Errored sectors</param>
/// <param name="correct">Correct sectors</param> /// <param name="correct">Correct sectors</param>
public static void AddMediaScan(long lessThan3ms, long lessThan10ms, long lessThan50ms, long lessThan150ms, public static void AddMediaScan(long lessThan3ms, long lessThan10ms, long lessThan50ms, long lessThan150ms,
long lessThan500ms, long moreThan500ms, long total, long error, long correct) long lessThan500ms, long moreThan500ms, long total, long error,
long correct)
{ {
if(Settings.Settings.Current.Stats == null || !Settings.Settings.Current.Stats.MediaScanStats) return; if(Settings.Settings.Current.Stats == null || !Settings.Settings.Current.Stats.MediaScanStats) return;

View File

@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup> <PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
@@ -37,12 +37,19 @@
<Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="DetectOS.cs" /> <Compile Include="DetectOS.cs" />
<Compile Include="PlatformID.cs" /> <Compile Include="PlatformID.cs" />
<Compile Include="Version.cs" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<EmbeddedResource Include="..\LICENSE.MIT"> <EmbeddedResource Include="..\LICENSE.MIT">
<Link>LICENSE.MIT</Link> <Link>LICENSE.MIT</Link>
</EmbeddedResource> </EmbeddedResource>
</ItemGroup> </ItemGroup>
<ItemGroup>
<ProjectReference Include="..\DiscImageChef.Metadata\DiscImageChef.Metadata.csproj">
<Project>{9F213318-5CB8-4066-A757-074489C9F818}</Project>
<Name>DiscImageChef.Metadata</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<ProjectExtensions> <ProjectExtensions>
<MonoDevelop> <MonoDevelop>

View File

@@ -5,7 +5,7 @@
// Filename : Version.cs // Filename : Version.cs
// Author(s) : Natalia Portillo <claunia@claunia.com> // Author(s) : Natalia Portillo <claunia@claunia.com>
// //
// Component : Core algorithms. // Component : Interop services.
// //
// --[ Description ] ---------------------------------------------------------- // --[ Description ] ----------------------------------------------------------
// //
@@ -13,18 +13,24 @@
// //
// --[ License ] -------------------------------------------------------------- // --[ License ] --------------------------------------------------------------
// //
// This program is free software: you can redistribute it and/or modify // Permission is hereby granted, free of charge, to any person obtaining a
// it under the terms of the GNU General internal License as // copy of this software and associated documentation files (the
// published by the Free Software Foundation, either version 3 of the // "Software"), to deal in the Software without restriction, including
// License, or (at your option) any later version. // 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:
// //
// This program is distributed in the hope that it will be useful, // The above copyright notice and this permission notice shall be included
// but WITHOUT ANY WARRANTY; without even the implied warranty of // in all copies or substantial portions of the Software.
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General internal License for more details.
// //
// You should have received a copy of the GNU General internal License // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// along with this program. If not, see <http://www.gnu.org/licenses/>. // 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.
// //
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// Copyright © 2011-2018 Natalia Portillo // Copyright © 2011-2018 Natalia Portillo
@@ -33,16 +39,16 @@
using DiscImageChef.Interop; using DiscImageChef.Interop;
using Schemas; using Schemas;
namespace DiscImageChef.Core namespace DiscImageChef.Interop
{ {
static class Version public static class Version
{ {
/// <summary> /// <summary>
/// Gets XML software type for the running version /// Gets XML software type for the running version
/// </summary> /// </summary>
/// <param name="platform">Platform we are running in</param> /// <param name="platform">Platform we are running in</param>
/// <returns>XML software type</returns> /// <returns>XML software type</returns>
internal static SoftwareType GetSoftwareType(PlatformID platform) public static SoftwareType GetSoftwareType(PlatformID platform)
{ {
// TODO: Platform should be get automatically // TODO: Platform should be get automatically
return new SoftwareType return new SoftwareType
@@ -57,7 +63,7 @@ namespace DiscImageChef.Core
/// Gets version string /// Gets version string
/// </summary> /// </summary>
/// <returns>Version</returns> /// <returns>Version</returns>
internal static string GetVersion() public static string GetVersion()
{ {
return typeof(Version).Assembly.GetName().Version.ToString(); return typeof(Version).Assembly.GetName().Version.ToString();
} }