Refactor: Move IBGLog to Core.

This commit is contained in:
2017-05-27 15:42:00 +01:00
parent 9a87466b25
commit e5d667f424
7 changed files with 31 additions and 14 deletions

View File

@@ -1,3 +1,8 @@
2017-05-27 Natalia Portillo <claunia@claunia.com>
* IBGLog.cs:
* DiscImageChef.Core.csproj: Refactor: Move IBGLog to Core.
2017-05-27 Natalia Portillo <claunia@claunia.com>
* Checksum.cs:

View File

@@ -39,6 +39,7 @@
<Compile Include="ImageFormat.cs" />
<Compile Include="Statistics.cs" />
<Compile Include="Checksum.cs" />
<Compile Include="Logging\IBGLog.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\DiscImageChef.Console\DiscImageChef.Console.csproj">
@@ -82,5 +83,8 @@
<Name>DiscImageChef.Metadata</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Folder Include="Logging\" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
</Project>

View File

@@ -36,7 +36,7 @@ using System.IO;
using System.Text;
using DiscImageChef.Devices;
namespace DiscImageChef.Core
namespace DiscImageChef.Core.Logging
{
public class IBGLog
{

View File

@@ -1,3 +1,10 @@
2017-05-27 Natalia Portillo <claunia@claunia.com>
* DiscImageChef.csproj:
* Commands/DumpMedia.cs:
* Commands/MediaScan.cs:
Refactor: Move IBGLog to Core.
2017-05-27 Natalia Portillo <claunia@claunia.com>
* DiscImageChef.csproj:

View File

@@ -36,6 +36,7 @@ using System.IO;
using DiscImageChef.CommonTypes;
using DiscImageChef.Console;
using DiscImageChef.Core;
using DiscImageChef.Core.Logging;
using DiscImageChef.Decoders.PCMCIA;
using DiscImageChef.Devices;
using DiscImageChef.Filesystems;
@@ -51,7 +52,7 @@ namespace DiscImageChef.Commands
static bool aborted;
static FileStream dataFs;
static Core.MHDDLog mhddLog;
static Core.IBGLog ibgLog;
static IBGLog ibgLog;
// TODO: Implement dump map
public static void doDumpMedia(DumpMediaOptions options)
@@ -426,7 +427,7 @@ namespace DiscImageChef.Commands
DicConsole.WriteLine("Reading {0} sectors at a time.", blocksToRead);
mhddLog = new Core.MHDDLog(options.OutputPrefix + ".mhddlog.bin", dev, blocks, blockSize, blocksToRead);
ibgLog = new Core.IBGLog(options.OutputPrefix + ".ibg", currentProfile);
ibgLog = new IBGLog(options.OutputPrefix + ".ibg", currentProfile);
initDataFile(options.OutputPrefix + ".bin");
start = DateTime.UtcNow;
@@ -640,7 +641,7 @@ namespace DiscImageChef.Commands
else
{
mhddLog = new Core.MHDDLog(options.OutputPrefix + ".mhddlog.bin", dev, blocks, blockSize, blocksToRead);
ibgLog = new Core.IBGLog(options.OutputPrefix + ".ibg", currentProfile);
ibgLog = new IBGLog(options.OutputPrefix + ".ibg", currentProfile);
initDataFile(options.OutputPrefix + ".bin");
ulong currentBlock = 0;
@@ -1334,7 +1335,7 @@ namespace DiscImageChef.Commands
dataChk = new Core.Checksum();
start = DateTime.UtcNow;
mhddLog = new Core.MHDDLog(options.OutputPrefix + ".mhddlog.bin", dev, blocks, blockSize, 1);
ibgLog = new Core.IBGLog(options.OutputPrefix + ".ibg", 0x0008);
ibgLog = new IBGLog(options.OutputPrefix + ".ibg", 0x0008);
currentTapeFile = new TapeFileType();
currentTapeFile.Image = new ImageType();
@@ -2547,7 +2548,7 @@ namespace DiscImageChef.Commands
initDataFile(options.OutputPrefix + ".bin");
mhddLog = new Core.MHDDLog(options.OutputPrefix + ".mhddlog.bin", dev, blocks, blockSize, blocksToRead);
ibgLog = new Core.IBGLog(options.OutputPrefix + ".ibg", 0x0008);
ibgLog = new IBGLog(options.OutputPrefix + ".ibg", 0x0008);
start = DateTime.UtcNow;
for(ulong i = 0; i < blocks; i += blocksToRead)
@@ -2950,7 +2951,7 @@ namespace DiscImageChef.Commands
DicConsole.WriteLine("Reading {0} sectors at a time.", blocksToRead);
mhddLog = new Core.MHDDLog(options.OutputPrefix + ".mhddlog.bin", dev, blocks, blockSize, blocksToRead);
ibgLog = new Core.IBGLog(options.OutputPrefix + ".ibg", currentProfile);
ibgLog = new IBGLog(options.OutputPrefix + ".ibg", currentProfile);
initDataFile(options.OutputPrefix + ".bin");
start = DateTime.UtcNow;
@@ -3897,7 +3898,7 @@ namespace DiscImageChef.Commands
DicConsole.WriteLine("Reading {0} sectors at a time.", blocksToRead);
mhddLog = new Core.MHDDLog(options.OutputPrefix + ".mhddlog.bin", dev, blocks, blockSize, blocksToRead);
ibgLog = new Core.IBGLog(options.OutputPrefix + ".ibg", currentProfile);
ibgLog = new IBGLog(options.OutputPrefix + ".ibg", currentProfile);
initDataFile(options.OutputPrefix + ".bin");
start = DateTime.UtcNow;

View File

@@ -34,6 +34,7 @@ using System;
using DiscImageChef.Console;
using DiscImageChef.Devices;
using System.Collections.Generic;
using DiscImageChef.Core.Logging;
namespace DiscImageChef.Commands
{
@@ -41,7 +42,7 @@ namespace DiscImageChef.Commands
{
static bool aborted;
static Core.MHDDLog mhddLog;
static Core.IBGLog ibgLog;
static IBGLog ibgLog;
public static void doMediaScan(MediaScanOptions options)
{
@@ -338,7 +339,7 @@ namespace DiscImageChef.Commands
DicConsole.WriteLine("Reading {0} sectors at a time.", blocksToRead);
mhddLog = new Core.MHDDLog(MHDDLogPath, dev, blocks, blockSize, blocksToRead);
ibgLog = new Core.IBGLog(IBGLogPath, currentProfile);
ibgLog = new IBGLog(IBGLogPath, currentProfile);
start = DateTime.UtcNow;
for(ulong i = 0; i < blocks; i += blocksToRead)
@@ -490,7 +491,7 @@ namespace DiscImageChef.Commands
else
{
mhddLog = new Core.MHDDLog(MHDDLogPath, dev, blocks, blockSize, blocksToRead);
ibgLog = new Core.IBGLog(IBGLogPath, currentProfile);
ibgLog = new IBGLog(IBGLogPath, currentProfile);
ulong currentBlock = 0;
blocks = (ulong)(cylinders * heads * sectors);
@@ -920,7 +921,7 @@ namespace DiscImageChef.Commands
DicConsole.WriteLine("Reading {0} sectors at a time.", blocksToRead);
mhddLog = new Core.MHDDLog(MHDDLogPath, dev, blocks, blockSize, blocksToRead);
ibgLog = new Core.IBGLog(IBGLogPath, currentProfile);
ibgLog = new IBGLog(IBGLogPath, currentProfile);
for(ulong i = 0; i < blocks; i += blocksToRead)
{
@@ -1106,7 +1107,7 @@ namespace DiscImageChef.Commands
DicConsole.WriteLine("Reading {0} sectors at a time.", blocksToRead);
mhddLog = new Core.MHDDLog(MHDDLogPath, dev, blocks, blockSize, blocksToRead);
ibgLog = new Core.IBGLog(IBGLogPath, currentProfile);
ibgLog = new IBGLog(IBGLogPath, currentProfile);
for(ulong i = 0; i < blocks; i += blocksToRead)
{

View File

@@ -65,7 +65,6 @@
<Compile Include="Commands\DeviceReport.cs" />
<Compile Include="Commands\Configure.cs" />
<Compile Include="Commands\Statistics.cs" />
<Compile Include="Core\IBGLog.cs" />
<Compile Include="Core\MHDDLog.cs" />
<Compile Include="Commands\Ls.cs" />
<Compile Include="Commands\ExtractFiles.cs" />