mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
Make CMPWriter disposable, add empty classes
This commit is contained in:
@@ -623,7 +623,7 @@ namespace SabreTools.Library.DatFiles
|
||||
WriteFooter(cmpw);
|
||||
|
||||
Globals.Logger.Verbose($"File written!{Environment.NewLine}");
|
||||
cmpw.Close();
|
||||
cmpw.Dispose();
|
||||
fs.Dispose();
|
||||
}
|
||||
catch (Exception ex)
|
||||
|
||||
@@ -359,7 +359,7 @@ namespace SabreTools.Library.DatFiles
|
||||
WriteFooter(cmpw);
|
||||
|
||||
Globals.Logger.Verbose($"File written!{Environment.NewLine}");
|
||||
cmpw.Close();
|
||||
cmpw.Dispose();
|
||||
fs.Dispose();
|
||||
}
|
||||
catch (Exception ex)
|
||||
|
||||
12
SabreTools.Library/Readers/ClrMameProReader.cs
Normal file
12
SabreTools.Library/Readers/ClrMameProReader.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace SabreTools.Library.Readers
|
||||
{
|
||||
public class ClrMameProReader
|
||||
{
|
||||
}
|
||||
}
|
||||
12
SabreTools.Library/Readers/SeparatedValueReader.cs
Normal file
12
SabreTools.Library/Readers/SeparatedValueReader.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace SabreTools.Library.Readers
|
||||
{
|
||||
public class SeparatedValueReader
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -8,7 +8,7 @@ namespace SabreTools.Library.Writers
|
||||
/// ClrMamePro writer patterned heavily off of XmlTextWriter
|
||||
/// </summary>
|
||||
/// <see cref="https://referencesource.microsoft.com/#System.Xml/System/Xml/Core/XmlTextWriter.cs"/>
|
||||
public class ClrMameProWriter
|
||||
public class ClrMameProWriter : IDisposable
|
||||
{
|
||||
/// <summary>
|
||||
/// State machine state for use in the table
|
||||
@@ -299,6 +299,15 @@ namespace SabreTools.Library.Writers
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Close and dispose
|
||||
/// </summary>
|
||||
public void Dispose()
|
||||
{
|
||||
Close();
|
||||
textWriter.Dispose();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Flush the base TextWriter
|
||||
/// </summary>
|
||||
|
||||
8
SabreTools/Properties/launchSettings.json
Normal file
8
SabreTools/Properties/launchSettings.json
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"profiles": {
|
||||
"SabreTools": {
|
||||
"commandName": "Project",
|
||||
"commandLineArgs": "--update --output-dir=B:\\_TEMP --output-type=xml \"B:\\_TEMP\\DEmul x86 v0.7 BUILD 111117.dat\""
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user