Extract out FileTypes namespace

This commit is contained in:
Matt Nadareski
2020-12-08 14:53:49 -08:00
parent 0512e393c8
commit 82e3a3939b
134 changed files with 500 additions and 641 deletions

2
.gitignore vendored
View File

@@ -10,6 +10,8 @@
/SabreTools/SabreTools.csproj.user /SabreTools/SabreTools.csproj.user
/SabreTools.Core/bin/ /SabreTools.Core/bin/
/SabreTools.Core/obj/ /SabreTools.Core/obj/
/SabreTools.FileTypes/bin/
/SabreTools.FileTypes/obj/
/SabreTools.Filtering/bin/ /SabreTools.Filtering/bin/
/SabreTools.Filtering/obj/ /SabreTools.Filtering/obj/
/SabreTools.Help/bin/ /SabreTools.Help/bin/

View File

@@ -6,11 +6,11 @@ using System.Xml;
using System.Xml.Schema; using System.Xml.Schema;
using SabreTools.Core; using SabreTools.Core;
using SabreTools.FileTypes;
using SabreTools.Help; using SabreTools.Help;
using SabreTools.Logging; using SabreTools.Logging;
using SabreTools.Library.DatFiles; using SabreTools.Library.DatFiles;
using SabreTools.Library.DatItems; using SabreTools.Library.DatItems;
using SabreTools.Library.FileTypes;
using Microsoft.Data.Sqlite; using Microsoft.Data.Sqlite;
namespace RombaSharp.Features namespace RombaSharp.Features

View File

@@ -17,6 +17,7 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\SabreTools.FileTypes\SabreTools.FileTypes.csproj" />
<ProjectReference Include="..\SabreTools.Filtering\SabreTools.Filtering.csproj" /> <ProjectReference Include="..\SabreTools.Filtering\SabreTools.Filtering.csproj" />
<ProjectReference Include="..\SabreTools.Help\SabreTools.Help.csproj" /> <ProjectReference Include="..\SabreTools.Help\SabreTools.Help.csproj" />
<ProjectReference Include="..\SabreTools.Library\SabreTools.Library.csproj" /> <ProjectReference Include="..\SabreTools.Library\SabreTools.Library.csproj" />

View File

@@ -11,7 +11,6 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.IO;
using System.Linq; using System.Linq;
using System.Text.RegularExpressions; using System.Text.RegularExpressions;

View File

@@ -3,7 +3,7 @@ using System.Text;
using SabreTools.Core; using SabreTools.Core;
namespace SabreTools.Library.FileTypes.Aaru namespace SabreTools.FileTypes.Aaru
{ {
/// <summary> /// <summary>
/// Checksum entry, followed by checksum data itself /// Checksum entry, followed by checksum data itself

View File

@@ -3,7 +3,7 @@ using System.Text;
using SabreTools.Core; using SabreTools.Core;
namespace SabreTools.Library.FileTypes.Aaru namespace SabreTools.FileTypes.Aaru
{ {
/// <summary> /// <summary>
/// Checksum block, contains a checksum of all user data sectors /// Checksum block, contains a checksum of all user data sectors

View File

@@ -3,7 +3,7 @@ using System.Text;
using SabreTools.Core; using SabreTools.Core;
namespace SabreTools.Library.FileTypes.Aaru namespace SabreTools.FileTypes.Aaru
{ {
/// <summary> /// <summary>
/// Index entry /// Index entry

View File

@@ -3,7 +3,7 @@ using System.Text;
using SabreTools.Core; using SabreTools.Core;
namespace SabreTools.Library.FileTypes.Aaru namespace SabreTools.FileTypes.Aaru
{ {
/// <summary> /// <summary>
/// Header for the index, followed by entries /// Header for the index, followed by entries

View File

@@ -1,12 +1,11 @@
using System; using System.IO;
using System.IO;
using System.Text; using System.Text;
using SabreTools.IO; using SabreTools.IO;
using SabreTools.Core; using SabreTools.Core;
using SabreTools.Library.FileTypes.Aaru; using SabreTools.FileTypes.Aaru;
namespace SabreTools.Library.FileTypes namespace SabreTools.FileTypes
{ {
/// <summary> /// <summary>
/// AaruFormat code is based on the Aaru project /// AaruFormat code is based on the Aaru project

View File

@@ -3,7 +3,7 @@ using System.IO;
using SabreTools.Core; using SabreTools.Core;
namespace SabreTools.Library.FileTypes namespace SabreTools.FileTypes
{ {
public abstract class BaseArchive : Folder public abstract class BaseArchive : Folder
{ {

View File

@@ -1,16 +1,15 @@
using System; using System.Collections.Generic;
using System.Collections.Generic;
using System.IO; using System.IO;
using System.Linq; using System.Linq;
using System.Threading.Tasks; using System.Threading.Tasks;
using SabreTools.Core; using SabreTools.Core;
using SabreTools.IO; using SabreTools.IO;
using SabreTools.Library.IO;
using SabreTools.Logging; using SabreTools.Logging;
using SabreTools.Skippers;
using Compress.ThreadReaders; using Compress.ThreadReaders;
namespace SabreTools.Library.FileTypes namespace SabreTools.FileTypes
{ {
public class BaseFile public class BaseFile
{ {
@@ -268,7 +267,7 @@ namespace SabreTools.Library.FileTypes
// Try to match the supplied header skipper // Try to match the supplied header skipper
if (header != null) if (header != null)
{ {
var rule = Transform.GetMatchingRule(input, Path.GetFileNameWithoutExtension(header)); var rule = SkipperMatch.GetMatchingRule(input, Path.GetFileNameWithoutExtension(header));
// If there's a match, transform the stream before getting info // If there's a match, transform the stream before getting info
if (rule.Tests != null && rule.Tests.Count != 0) if (rule.Tests != null && rule.Tests.Count != 0)

View File

@@ -4,7 +4,7 @@ using System.Text;
using SabreTools.IO; using SabreTools.IO;
namespace SabreTools.Library.FileTypes.CHD namespace SabreTools.FileTypes.CHD
{ {
/// <summary> /// <summary>
/// CHD V1 File /// CHD V1 File

View File

@@ -4,7 +4,7 @@ using System.Text;
using SabreTools.IO; using SabreTools.IO;
namespace SabreTools.Library.FileTypes.CHD namespace SabreTools.FileTypes.CHD
{ {
/// <summary> /// <summary>
/// CHD V2 File /// CHD V2 File

View File

@@ -4,7 +4,7 @@ using System.Text;
using SabreTools.IO; using SabreTools.IO;
namespace SabreTools.Library.FileTypes.CHD namespace SabreTools.FileTypes.CHD
{ {
/// <summary> /// <summary>
/// CHD V3 File /// CHD V3 File

View File

@@ -4,7 +4,7 @@ using System.Text;
using SabreTools.IO; using SabreTools.IO;
namespace SabreTools.Library.FileTypes.CHD namespace SabreTools.FileTypes.CHD
{ {
/// <summary> /// <summary>
/// CHD V4 File /// CHD V4 File

View File

@@ -3,7 +3,7 @@ using System.Text;
using SabreTools.IO; using SabreTools.IO;
namespace SabreTools.Library.FileTypes.CHD namespace SabreTools.FileTypes.CHD
{ {
/// <summary> /// <summary>
/// CHD V5 File /// CHD V5 File

View File

@@ -4,9 +4,9 @@ using System.Text;
using SabreTools.Core; using SabreTools.Core;
using SabreTools.IO; using SabreTools.IO;
using SabreTools.Library.FileTypes.CHD; using SabreTools.FileTypes.CHD;
namespace SabreTools.Library.FileTypes namespace SabreTools.FileTypes
{ {
/// <summary> /// <summary>
/// This is code adapted from chd.h and chd.cpp in MAME /// This is code adapted from chd.h and chd.cpp in MAME

Some files were not shown because too many files have changed in this diff Show More