mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
[DatFile, Utilities] Some organization to factories
This commit is contained in:
@@ -3056,7 +3056,7 @@ namespace SabreTools.Library.DatFiles
|
||||
// Now parse the correct type of DAT
|
||||
try
|
||||
{
|
||||
Utilities.GetDatFile(Utilities.GetDatFormat(filename), this)?.ParseFile(filename, sysid, srcid, keep, clean, remUnicode);
|
||||
Utilities.GetDatFile(filename, this)?.ParseFile(filename, sysid, srcid, keep, clean, remUnicode);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
||||
@@ -538,7 +538,6 @@ namespace SabreTools.Library.Tools
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Create a specific type of BaseReport to be used based on a format and user inputs
|
||||
/// </summary>
|
||||
@@ -564,6 +563,18 @@ namespace SabreTools.Library.Tools
|
||||
return null;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Create a specific type of DatFile to be used based on an input file and a base DAT
|
||||
/// </summary>
|
||||
/// <param name="input">Name of the file to determine the DAT format from</param>
|
||||
/// <param name="baseDat">DatFile containing the information to use in specific operations</param>
|
||||
/// <returns>DatFile of the specific internal type that corresponds to the inputs</returns>
|
||||
public static DatFile GetDatFile(string input, DatFile baseDat)
|
||||
{
|
||||
DatFormat datFormat = GetDatFormat(input);
|
||||
return GetDatFile(datFormat, baseDat);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Create a specific type of DatFile to be used based on a format and a base DAT
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user