Make CMPWriter disposable, add empty classes

This commit is contained in:
Matt Nadareski
2020-06-14 14:16:03 -07:00
parent 4b9185b4f0
commit d60dcad323
6 changed files with 44 additions and 3 deletions

View File

@@ -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)

View File

@@ -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)

View 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
{
}
}

View 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
{
}
}

View File

@@ -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>

View 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\""
}
}
}