[doc] Add actual documentation to all classes

This commit is contained in:
Matt Nadareski
2016-03-29 14:49:03 -07:00
parent c43be67ebc
commit 175334a62c
9 changed files with 252 additions and 19 deletions

View File

@@ -11,6 +11,9 @@ using SabreTools.Helper;
namespace SabreTools namespace SabreTools
{ {
/// <summary>
/// Generate a DAT from the data in the database
/// </summary>
class Generate class Generate
{ {
// Private instance variables // Private instance variables
@@ -24,6 +27,15 @@ namespace SabreTools
private Dictionary<int, string> _headers; private Dictionary<int, string> _headers;
private Logger _logger; private Logger _logger;
/// <summary>
/// Initialize a Generate object with the given information
/// </summary>
/// <param name="systems">Comma-separated list of systems to be included in the DAT (blank means all)</param>
/// <param name="sources">Comma-separated list of sources to be included in the DAT (blank means all)</param>
/// <param name="connectionString">Connection string for SQLite</param>
/// <param name="logger">Logger object for file or console output</param>
/// <param name="norename">True if files should not be renamed with system and/or source in merged mode (default false)</param>
/// <param name="old">True if the output file should be in RomVault format (default false)</param>
public Generate(string systems, string sources, string connectionString, Logger logger, bool norename = false, bool old = false) public Generate(string systems, string sources, string connectionString, Logger logger, bool norename = false, bool old = false)
{ {
_systems = systems; _systems = systems;
@@ -43,6 +55,10 @@ namespace SabreTools
_headers.Add(241, "snes.xml"); // Self-created to deal with various headers _headers.Add(241, "snes.xml"); // Self-created to deal with various headers
} }
/// <summary>
/// Generate a DAT file that is represented by the data in the Generate object.
/// </summary>
/// <returns>True if the file could be created, false otherwise</returns>
public bool Export() public bool Export()
{ {
// Check to see if the source is an import-only. If so, tell the user and exit // Check to see if the source is an import-only. If so, tell the user and exit
@@ -251,6 +267,10 @@ namespace SabreTools
return true; return true;
} }
/// <summary>
/// Preprocess the rom data that is to be included in the outputted DAT
/// </summary>
/// <returns>A List of RomData objects containing all information about the files</returns>
public List<RomData> ProcessRoms() public List<RomData> ProcessRoms()
{ {
List<RomData> roms = new List<RomData>(); List<RomData> roms = new List<RomData>();
@@ -429,7 +449,9 @@ JOIN checksums
} }
} }
// Intermediate struct for holding and processing rom data /// <summary>
/// Intermediate struct for holding and processing rom data
/// </summary>
public struct RomData public struct RomData
{ {
public string Manufacturer; public string Manufacturer;

View File

@@ -32,6 +32,10 @@ namespace SabreTools
7) You should be done! Unless your DAT is of a custom format, it should be taken care of on import. 7) You should be done! Unless your DAT is of a custom format, it should be taken care of on import.
i. If custom handling is needed on import, look for "SuperDAT" for an example i. If custom handling is needed on import, look for "SuperDAT" for an example
*/ */
/// <summary>
/// Import data into the database from existing DATs
/// </summary>
public class Import public class Import
{ {
// Private instance variables // Private instance variables
@@ -56,6 +60,9 @@ namespace SabreTools
private static string _redumpDatePattern = @"(\d{4})(\d{2})(\d{2}) (\d{2})-(\d{2})-(\d{2})"; private static string _redumpDatePattern = @"(\d{4})(\d{2})(\d{2}) (\d{2})-(\d{2})-(\d{2})";
private static string _tosecDatePattern = @"(\d{4})-(\d{2})-(\d{2})"; private static string _tosecDatePattern = @"(\d{4})-(\d{2})-(\d{2})";
/// <summary>
/// Possible DAT import classes
/// </summary>
private enum DatType private enum DatType
{ {
none = 0, none = 0,
@@ -73,7 +80,12 @@ namespace SabreTools
get { return _filepath; } get { return _filepath; }
} }
// Constructor /// <summary>
/// Initialize an Import object with the given information
/// </summary>
/// <param name="filepath">Path to the file that is going to be imported</param>
/// <param name="connectionString">Connection string for SQLite</param>
/// <param name="logger">Logger object for file or console output</param>
public Import(string filepath, string connectionString, Logger logger) public Import(string filepath, string connectionString, Logger logger)
{ {
if (File.Exists(filepath)) if (File.Exists(filepath))
@@ -89,7 +101,10 @@ namespace SabreTools
_logger = logger; _logger = logger;
} }
// Import the data from file into the database /// <summary>
/// Import the data from file into the database
/// </summary>
/// <returns>True if the data was imported, false otherwise</returns>
public bool ImportData () public bool ImportData ()
{ {
// Determine which dattype we have // Determine which dattype we have
@@ -353,7 +368,7 @@ namespace SabreTools
// If we find a rom or disk, add it // If we find a rom or disk, add it
if (node.NodeType == XmlNodeType.Element && (child.Name == "rom" || child.Name == "disk")) if (node.NodeType == XmlNodeType.Element && (child.Name == "rom" || child.Name == "disk"))
{ {
AddRomHelper( AddRom(
child.Name, child.Name,
gameid, gameid,
child.Attributes["name"].Value, child.Attributes["name"].Value,
@@ -377,7 +392,7 @@ namespace SabreTools
// If we find a rom or disk, add it // If we find a rom or disk, add it
if (data.NodeType == XmlNodeType.Element && (data.Name == "rom" || data.Name == "disk")) if (data.NodeType == XmlNodeType.Element && (data.Name == "rom" || data.Name == "disk"))
{ {
AddRomHelper( AddRom(
data.Name, data.Name,
gameid, gameid,
data.Attributes["name"].Value, data.Attributes["name"].Value,
@@ -401,6 +416,13 @@ namespace SabreTools
return true; return true;
} }
/// <summary>
/// Add a game to the database if it doesn't already exist
/// </summary>
/// <param name="sysid">System ID for the game to be added with</param>
/// <param name="machinename">Name of the game to be added</param>
/// <param name="srcid">Source ID for the game to be added with</param>
/// <returns>Game ID of the inserted (or found) game, -1 on error</returns>
private long AddGame(int sysid, string machinename, int srcid) private long AddGame(int sysid, string machinename, int srcid)
{ {
// WoD gets rid of anything past the first "(" or "[" as the name, we will do the same // WoD gets rid of anything past the first "(" or "[" as the name, we will do the same
@@ -457,7 +479,19 @@ namespace SabreTools
return gameid; return gameid;
} }
private bool AddRomHelper(string romtype, long gameid, string name, string date, int size, string crc, string md5, string sha1) /// <summary>
/// Add a file to the database if it doesn't already exist
/// </summary>
/// <param name="romtype">File type (either "rom" or "disk")</param>
/// <param name="gameid">ID of the parent game to be mapped to</param>
/// <param name="name">File name</param>
/// <param name="date">Last updated date</param>
/// <param name="size">File size in bytes</param>
/// <param name="crc">CRC32 hash of the file</param>
/// <param name="md5">MD5 hash of the file</param>
/// <param name="sha1">SHA-1 hash of the file</param>
/// <returns>True if the file exists or could be added, false on error</returns>
private bool AddRom(string romtype, long gameid, string name, string date, int size, string crc, string md5, string sha1)
{ {
// WOD origninally stripped out any subdirs from the imported files, we do the same // WOD origninally stripped out any subdirs from the imported files, we do the same
name = Path.GetFileName(name); name = Path.GetFileName(name);

View File

@@ -7,6 +7,9 @@ using SabreTools.Helper;
namespace SabreTools namespace SabreTools
{ {
/// <summary>
/// Entry class for the DATabase application
/// </summary>
class DATabase class DATabase
{ {
private static Logger logger; private static Logger logger;
@@ -22,7 +25,11 @@ namespace SabreTools
+-----------------------------------------------------------------------------+ +-----------------------------------------------------------------------------+
"; ";
static void Main(string[] args) /// <summary>
/// Start menu or use supplied parameters
/// </summary>
/// <param name="args">String array representing command line parameters</param>
public static void Main(string[] args)
{ {
// Perform initial setup and verification // Perform initial setup and verification
logger = new Logger(false, "database.log"); logger = new Logger(false, "database.log");
@@ -169,6 +176,9 @@ namespace SabreTools
return; return;
} }
/// <summary>
/// Print the program header
/// </summary>
private static void PrintHeader() private static void PrintHeader()
{ {
ConsoleColor formertext = Console.ForegroundColor; ConsoleColor formertext = Console.ForegroundColor;
@@ -180,6 +190,9 @@ namespace SabreTools
Console.BackgroundColor = formerback; Console.BackgroundColor = formerback;
} }
/// <summary>
/// Show the text-based main menu
/// </summary>
private static void ShowMainMenu() private static void ShowMainMenu()
{ {
Console.Clear(); Console.Clear();
@@ -249,6 +262,9 @@ Make a selection:
Console.WriteLine("Thank you for using DATabase!"); Console.WriteLine("Thank you for using DATabase!");
} }
/// <summary>
/// Show the help dialog
/// </summary>
private static void Help() private static void Help()
{ {
Console.Clear(); Console.Clear();
@@ -294,6 +310,9 @@ Database Options:
return; return;
} }
/// <summary>
/// Show the text-based import menu
/// </summary>
private static void ImportMenu() private static void ImportMenu()
{ {
string selection = ""; string selection = "";
@@ -317,6 +336,10 @@ or 'b' to go back to the previous menu:");
return; return;
} }
/// <summary>
/// Wrap importing a file or folder into the database
/// </summary>
/// <param name="filename">File or folder to be imported</param>
private static void InitImport(string filename) private static void InitImport(string filename)
{ {
Console.Clear(); Console.Clear();
@@ -347,6 +370,9 @@ or 'b' to go back to the previous menu:");
return; return;
} }
/// <summary>
/// Show the text-based generate menu
/// </summary>
private static void GenerateMenu() private static void GenerateMenu()
{ {
string selection = "", systems = "", sources = ""; string selection = "", systems = "", sources = "";
@@ -399,6 +425,23 @@ Make a selection:
return; return;
} }
/// <summary>
/// Wrap generating a DAT from the database
/// </summary>
/// <param name="systems">Comma-separated list of systems to be included in the DAT (blank means all)</param>
/// <param name="sources">Comma-separated list of sources to be included in the DAT (blank means all)</param>
/// <param name="norename">True if files should not be renamed with system and/or source in merged mode (default false)</param>
/// <param name="old">True if the output file should be in RomVault format (default false)</param>
private static void InitGenerate(string systems, string sources, bool norename, bool old)
{
Generate gen = new Generate(systems, sources, _connectionString, logger, norename, old);
gen.Export();
return;
}
/// <summary>
/// Show the text-based generate all menu
/// </summary>
private static void GenerateAllMenu() private static void GenerateAllMenu()
{ {
string selection = ""; string selection = "";
@@ -437,14 +480,11 @@ Make a selection:
return; return;
} }
/// TODO: Make this safe for auto-generating multiple files (such as auto-generate) /// <summary>
private static void InitGenerate(string systems, string sources, bool norename, bool old) /// Wrap generating all standard DATs from the database
{ /// </summary>
Generate gen = new Generate(systems, sources, _connectionString, logger, norename, old); /// <param name="norename">True if files should not be renamed with system and/or source in merged mode (default false)</param>
gen.Export(); /// <param name="old">True if the output file should be in RomVault format (default false)</param>
return;
}
private static void InitGenerateAll(bool norename, bool old) private static void InitGenerateAll(bool norename, bool old)
{ {
// Generate system-merged // Generate system-merged
@@ -533,6 +573,9 @@ Make a selection:
return; return;
} }
/// <summary>
/// Show the text-based conversion menu
/// </summary>
private static void ConvertMenu() private static void ConvertMenu()
{ {
string selection = ""; string selection = "";
@@ -557,6 +600,10 @@ or 'b' to go back to the previous menu:
return; return;
} }
/// <summary>
/// Wrap converting DAT file from RomValut to XML
/// </summary>
/// <param name="filename"></param>
private static void InitConvert(string filename) private static void InitConvert(string filename)
{ {
if (File.Exists(filename)) if (File.Exists(filename))
@@ -579,6 +626,10 @@ or 'b' to go back to the previous menu:
return; return;
} }
/// <summary>
/// List sources in the database
/// </summary>
/// <param name="all">True to list all sources regardless if there is a game associated or not</param>
private static void ListSources(bool all = false) private static void ListSources(bool all = false)
{ {
string query = @" string query = @"
@@ -610,6 +661,10 @@ ORDER BY sources.name COLLATE NOCASE";
return; return;
} }
/// <summary>
/// List systems in the database
/// </summary>
/// <param name="all">True to list all systems regardless if there is a game associated or not</param>
private static void ListSystems(bool all = false) private static void ListSystems(bool all = false)
{ {
string query = @" string query = @"
@@ -641,6 +696,9 @@ ORDER BY systems.manufacturer, systems.system";
return; return;
} }
/// <summary>
/// Show the text-based add and remove menu
/// </summary>
private static void AddRemoveMenu() private static void AddRemoveMenu()
{ {
string selection = "", manufacturer = "", system = "", name = "", url = ""; string selection = "", manufacturer = "", system = "", name = "", url = "";
@@ -703,6 +761,11 @@ Make a selection:
return; return;
} }
/// <summary>
/// Wrap adding a new source to the database
/// </summary>
/// <param name="name">Source name</param>
/// <param name="url">Source URL(s)</param>
private static void InitAddSource(string name, string url) private static void InitAddSource(string name, string url)
{ {
if (DBTools.AddSource(name, url, _connectionString)) if (DBTools.AddSource(name, url, _connectionString))
@@ -715,6 +778,10 @@ Make a selection:
} }
} }
/// <summary>
/// Wrap removing an existing source from the database
/// </summary>
/// <param name="id">Source ID to be removed from the database</param>
private static void InitRemoveSource(string sourceid) private static void InitRemoveSource(string sourceid)
{ {
int srcid = -1; int srcid = -1;
@@ -735,6 +802,11 @@ Make a selection:
} }
} }
/// <summary>
/// Wrap adding a new system to the database
/// </summary>
/// <param name="manufacturer">Manufacturer name</param>
/// <param name="system">System name</param>
private static void InitAddSystem(string manufacturer, string system) private static void InitAddSystem(string manufacturer, string system)
{ {
if (DBTools.AddSystem(manufacturer, system, _connectionString)) if (DBTools.AddSystem(manufacturer, system, _connectionString))
@@ -747,6 +819,10 @@ Make a selection:
} }
} }
/// <summary>
/// Wrap removing an existing system from the database
/// </summary>
/// <param name="id">System ID to be removed from the database</param>
private static void InitRemoveSystem(string systemid) private static void InitRemoveSystem(string systemid)
{ {
int sysid = -1; int sysid = -1;

View File

@@ -4,13 +4,22 @@ using System.Xml.Linq;
namespace SabreTools.Helper namespace SabreTools.Helper
{ {
/// <summary>
/// Provide DAT conversion functionality
/// </summary>
class Converters class Converters
{ {
// Regex matching patterns
private static string _headerPattern = @"(^.*?) \($"; private static string _headerPattern = @"(^.*?) \($";
private static string _romPattern = @"^\s+((?:rom)|(?:disk)) \( (name) ""(.*?)"" (?:(size) (.*?) )?(?:(crc) (.*?))?(?:(md5) (.*?) )?(?:(sha1) (.*?) )?\)"; private static string _romPattern = @"^\s+((?:rom)|(?:disk)) \( (name) ""(.*?)"" (?:(size) (.*?) )?(?:(crc) (.*?))?(?:(md5) (.*?) )?(?:(sha1) (.*?) )?\)";
private static string _itemPattern = @"^\s+(.*?) ""(.*?)"""; private static string _itemPattern = @"^\s+(.*?) ""(.*?)""";
private static string _endPattern = @"^\s*\)\s*$"; private static string _endPattern = @"^\s*\)\s*$";
/// <summary>
/// Convert a RomVault style DAT to an XML derived DAT
/// </summary>
/// <param name="filecontents">Array of strings representing the input file</param>
/// <returns>XElement representing the output XML DAT file</returns>
public static XElement RomVaultToXML (string[] filecontents) public static XElement RomVaultToXML (string[] filecontents)
{ {
XElement elem = new XElement("datafile"); XElement elem = new XElement("datafile");

View File

@@ -4,8 +4,16 @@ using System.IO;
namespace SabreTools.Helper namespace SabreTools.Helper
{ {
/// <summary>
/// All general database operations
/// </summary>
class DBTools class DBTools
{ {
/// <summary>
/// Ensure that the databse exists and has the proper schema
/// </summary>
/// <param name="db">Name of the databse</param>
/// <param name="connectionString">Connection string for SQLite</param>
public static void EnsureDatabase(string db, string connectionString) public static void EnsureDatabase(string db, string connectionString)
{ {
// Make sure the file exists // Make sure the file exists
@@ -91,6 +99,13 @@ CREATE TABLE IF NOT EXISTS systems (
} }
} }
/// <summary>
/// Add a new source to the database if it doesn't already exist
/// </summary>
/// <param name="name">Source name</param>
/// <param name="url">Source URL(s)</param>
/// <param name="connectionString">Connection string for SQLite</param>
/// <returns>True if the source existed or could be added, false otherwise</returns>
public static bool AddSource(string name, string url, string connectionString) public static bool AddSource(string name, string url, string connectionString)
{ {
string query = "SELECT id, name, url FROM sources WHERE name='" + name + "'"; string query = "SELECT id, name, url FROM sources WHERE name='" + name + "'";
@@ -130,6 +145,12 @@ CREATE TABLE IF NOT EXISTS systems (
return true; return true;
} }
/// <summary>
/// Remove an existing source from the database
/// </summary>
/// <param name="id">Source ID to be removed from the database</param>
/// <param name="connectionString">Connection string for SQLite</param>
/// <returns>True if the source was removed, false otherwise</returns>
public static bool RemoveSource(int id, string connectionString) public static bool RemoveSource(int id, string connectionString)
{ {
string query = "DELETE FROM sources WHERE id=" + id; string query = "DELETE FROM sources WHERE id=" + id;
@@ -143,6 +164,13 @@ CREATE TABLE IF NOT EXISTS systems (
} }
} }
/// <summary>
/// Add a new system to the database if it doesn't already exist
/// </summary>
/// <param name="manufacturer">Manufacturer name</param>
/// <param name="system">System name</param>
/// <param name="connectionString">Connection string for SQLite</param>
/// <returns>True if the system existed or could be added, false otherwise</returns>
public static bool AddSystem(string manufacturer, string system, string connectionString) public static bool AddSystem(string manufacturer, string system, string connectionString)
{ {
string query = "SELECT id, manufacturer, system FROM systems WHERE manufacturer='" + manufacturer + "' AND system='" + system + "'"; string query = "SELECT id, manufacturer, system FROM systems WHERE manufacturer='" + manufacturer + "' AND system='" + system + "'";
@@ -168,6 +196,12 @@ CREATE TABLE IF NOT EXISTS systems (
return true; return true;
} }
/// <summary>
/// Remove an existing system from the database
/// </summary>
/// <param name="id">System ID to be removed from the database</param>
/// <param name="connectionString">Connection string for SQLite</param>
/// <returns>True if the system was removed, false otherwise</returns>
public static bool RemoveSystem(int id, string connectionString) public static bool RemoveSystem(int id, string connectionString)
{ {
string query = "DELETE FROM systems WHERE id=" + id; string query = "DELETE FROM systems WHERE id=" + id;

View File

@@ -3,6 +3,9 @@ using System.IO;
namespace SabreTools.Helper namespace SabreTools.Helper
{ {
/// <summary>
/// Log either to file or to the console
/// </summary>
public class Logger public class Logger
{ {
// Private instance variables // Private instance variables
@@ -28,12 +31,21 @@ namespace SabreTools.Helper
} }
} }
/// <summary>
/// Initialize a Logger object with the given information
/// </summary>
/// <param name="tofile">True if file should be written to instead of console</param>
/// <param name="filename">Optional filename representing log location</param>
public Logger(bool tofile, string filename = "") public Logger(bool tofile, string filename = "")
{ {
_tofile = tofile; _tofile = tofile;
_filename = filename; _filename = filename;
} }
/// <summary>
/// Start logging by opening output file (if necessary)
/// </summary>
/// <returns>True if the logging was started correctly, false otherwise</returns>
public bool Start() public bool Start()
{ {
if (!_tofile) if (!_tofile)
@@ -54,6 +66,10 @@ namespace SabreTools.Helper
return true; return true;
} }
/// <summary>
/// End logging by closing output file (if necessary)
/// </summary>
/// <returns>True if the logging was ended correctly, false otherwise</returns>
public bool Close() public bool Close()
{ {
if (!_tofile) if (!_tofile)
@@ -74,6 +90,11 @@ namespace SabreTools.Helper
return true; return true;
} }
/// <summary>
/// Write the given string to the log output
/// </summary>
/// <param name="output">String to be written log</param>
/// <returns>True if the output could be written, false otherwise</returns>
public bool Log(string output) public bool Log(string output)
{ {
// If we're writing to console, just write the string // If we're writing to console, just write the string

View File

@@ -5,14 +5,21 @@ using System.Xml;
namespace SabreTools.Helper namespace SabreTools.Helper
{ {
/// <summary>
/// Contains all remappings of known import classes
/// </summary>
class Remapping class Remapping
{ {
// Remapping classes represented by dictionaries
public static Dictionary<string, string> MAME = new Dictionary<string, string>(); public static Dictionary<string, string> MAME = new Dictionary<string, string>();
public static Dictionary<string, string> NoIntro = new Dictionary<string, string>(); public static Dictionary<string, string> NoIntro = new Dictionary<string, string>();
public static Dictionary<string, string> Redump = new Dictionary<string, string>(); public static Dictionary<string, string> Redump = new Dictionary<string, string>();
public static Dictionary<string, string> TOSEC = new Dictionary<string, string>(); public static Dictionary<string, string> TOSEC = new Dictionary<string, string>();
public static Dictionary<string, string> TruRip = new Dictionary<string, string>(); public static Dictionary<string, string> TruRip = new Dictionary<string, string>();
/// <summary>
/// Create all remappings to be used by the program
/// </summary>
public static void CreateRemappings() public static void CreateRemappings()
{ {
// Create array of dictionary names // Create array of dictionary names
@@ -28,6 +35,10 @@ namespace SabreTools.Helper
} }
} }
/// <summary>
/// Create a remapping from XML
/// </summary>
/// <param name="mapping">Name of the mapping to be populated</param>
private static void RemappingHelper(string mapping) private static void RemappingHelper(string mapping)
{ {
// Read in remapping from file // Read in remapping from file

View File

@@ -2,9 +2,16 @@
namespace SabreTools.Helper namespace SabreTools.Helper
{ {
/// <summary>
/// Include character normalization and replacement mappings
/// </summary>
public class Style public class Style
{ {
// Replace accented characters /// <summary>
/// Replace accented characters
/// </summary>
/// <param name="input">String to be parsed</param>
/// <returns>String with characters replaced</returns>
public static string NormalizeChars(string input) public static string NormalizeChars(string input)
{ {
string[,] charmap = { string[,] charmap = {
@@ -53,7 +60,11 @@ namespace SabreTools.Helper
return input; return input;
} }
// Replace special characters and patterns /// <summary>
/// Replace special characters and patterns
/// </summary>
/// <param name="input">String to be parsed</param>
/// <returns>String with characters replaced</returns>
public static string SearchPattern(string input) public static string SearchPattern(string input)
{ {
string[,] charmap = { string[,] charmap = {
@@ -93,8 +104,12 @@ namespace SabreTools.Helper
return input; return input;
} }
// Convert Cyrillic lettering to Latin lettering /// <summary>
public static string RussianToLatin (string input) /// Convert Cyrillic lettering to Latin lettering
/// </summary>
/// <param name="input">String to be parsed</param>
/// <returns>String with characters replaced</returns>
public static string RussianToLatin(string input)
{ {
string [,] charmap = { string [,] charmap = {
{ "А", "A" }, { "Б", "B" }, { "В", "V" }, { "Г", "G" }, { "Д", "D" }, { "А", "A" }, { "Б", "B" }, { "В", "V" }, { "Г", "G" }, { "Д", "D" },

View File

@@ -6,12 +6,19 @@ using System.Text.RegularExpressions;
namespace SabreTools namespace SabreTools
{ {
/// <summary>
/// Entry class for the Deheader application
/// </summary>
class Deheader class Deheader
{ {
private static Dictionary<string, int> types; private static Dictionary<string, int> types;
private static bool save; private static bool save;
private static string help = @"Deheader.exe [-s] filename|dirname"; private static string help = @"Deheader.exe [-s] filename|dirname";
/// <summary>
/// Start deheader operation with supplied parameters
/// </summary>
/// <param name="args">String array representing command line parameters</param>
static void Main(string[] args) static void Main(string[] args)
{ {
// Type mapped to header size (in decimal bytes) // Type mapped to header size (in decimal bytes)
@@ -65,6 +72,10 @@ namespace SabreTools
} }
} }
/// <summary>
/// Detect and remove header from the given file
/// </summary>
/// <param name="file">Name of the file to be parsed</param>
private static void DetectRemoveHeader(string file) private static void DetectRemoveHeader(string file)
{ {
// Open the file in read mode // Open the file in read mode