Use different interface name

This commit is contained in:
Matt Nadareski
2025-01-04 22:10:52 -05:00
parent 3dc8466cf7
commit b784a3b0bf
5 changed files with 8 additions and 8 deletions

View File

@@ -470,7 +470,7 @@ namespace SabreTools.DatTools
outputFormat = OutputFormat.ParentFolder; outputFormat = OutputFormat.ParentFolder;
// Get the output archive, if possible // Get the output archive, if possible
IFolder? outputArchive = GetPreconfiguredFolder(datFile, date, outputFormat); IParent? outputArchive = GetPreconfiguredFolder(datFile, date, outputFormat);
// Now rebuild to the output file // Now rebuild to the output file
outputArchive!.Write(fileStream, outDir, (item as Rom)!.ConvertToBaseFile()); outputArchive!.Write(fileStream, outDir, (item as Rom)!.ConvertToBaseFile());
@@ -516,7 +516,7 @@ namespace SabreTools.DatTools
datItem.SetName($"{datItem.GetName()}_{crc}"); datItem.SetName($"{datItem.GetName()}_{crc}");
// Get the output archive, if possible // Get the output archive, if possible
IFolder? outputArchive = GetPreconfiguredFolder(datFile, date, outputFormat); IParent? outputArchive = GetPreconfiguredFolder(datFile, date, outputFormat);
// Now rebuild to the output file // Now rebuild to the output file
bool eitherSuccess = false; bool eitherSuccess = false;
@@ -822,9 +822,9 @@ namespace SabreTools.DatTools
/// <param name="date">True if the date from the DAT should be used if available, false otherwise</param> /// <param name="date">True if the date from the DAT should be used if available, false otherwise</param>
/// <param name="outputFormat">Output format that files should be written to</param> /// <param name="outputFormat">Output format that files should be written to</param>
/// <returns>Folder configured with proper flags</returns> /// <returns>Folder configured with proper flags</returns>
private static IFolder? GetPreconfiguredFolder(DatFile datFile, bool date, OutputFormat outputFormat) private static IParent? GetPreconfiguredFolder(DatFile datFile, bool date, OutputFormat outputFormat)
{ {
IFolder? outputArchive = FileTypeTool.CreateFolderType(outputFormat); IParent? outputArchive = FileTypeTool.CreateFolderType(outputFormat);
if (outputArchive is BaseArchive baseArchive && date) if (outputArchive is BaseArchive baseArchive && date)
baseArchive.SetRealDates(date); baseArchive.SetRealDates(date);

View File

@@ -5,7 +5,7 @@ using SabreTools.IO.Logging;
namespace SabreTools.FileTypes namespace SabreTools.FileTypes
{ {
public abstract class BaseArchive : BaseFile, IFolder public abstract class BaseArchive : BaseFile, IParent
{ {
#region Protected instance variables #region Protected instance variables

View File

@@ -177,7 +177,7 @@ namespace SabreTools.FileTypes
/// </summary> /// </summary>
/// <param name="outputFormat">OutputFormat representing the archive to create</param> /// <param name="outputFormat">OutputFormat representing the archive to create</param>
/// <returns>IFolder object representing the inputs</returns> /// <returns>IFolder object representing the inputs</returns>
public static IFolder? CreateFolderType(OutputFormat outputFormat) public static IParent? CreateFolderType(OutputFormat outputFormat)
{ {
return outputFormat switch return outputFormat switch
{ {

View File

@@ -12,7 +12,7 @@ namespace SabreTools.FileTypes
/// <summary> /// <summary>
/// Represents a folder for reading and writing /// Represents a folder for reading and writing
/// </summary> /// </summary>
public class Folder : BaseFile, IFolder public class Folder : BaseFile, IParent
{ {
#region Protected instance variables #region Protected instance variables

View File

@@ -6,7 +6,7 @@ namespace SabreTools.FileTypes
/// <summary> /// <summary>
/// Represents an item that can contain children /// Represents an item that can contain children
/// </summary> /// </summary>
public interface IFolder public interface IParent
{ {
#region Extraction #region Extraction