mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
Perform mass cleanup
This is cleanup based on both new .NET functionality (in 6 and 7) as well as a ton of simplifications and things that were missed that were caught due to the cleanup.
This commit is contained in:
@@ -15,7 +15,7 @@ namespace SabreTools.Reports
|
||||
/// <summary>
|
||||
/// Logging object
|
||||
/// </summary>
|
||||
protected readonly Logger logger = new Logger();
|
||||
protected readonly Logger logger = new();
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ namespace SabreTools.Reports.Formats
|
||||
/// <inheritdoc/>
|
||||
public override bool WriteToFile(string outfile, bool baddumpCol, bool nodumpCol, bool throwOnError = false)
|
||||
{
|
||||
InternalStopwatch watch = new InternalStopwatch($"Writing statistics to '{outfile}");
|
||||
InternalStopwatch watch = new($"Writing statistics to '{outfile}");
|
||||
|
||||
try
|
||||
{
|
||||
@@ -39,7 +39,7 @@ namespace SabreTools.Reports.Formats
|
||||
return false;
|
||||
}
|
||||
|
||||
XmlTextWriter xtw = new XmlTextWriter(fs, Encoding.UTF8)
|
||||
XmlTextWriter xtw = new(fs, Encoding.UTF8)
|
||||
{
|
||||
Formatting = Formatting.Indented,
|
||||
IndentChar = '\t',
|
||||
|
||||
@@ -29,7 +29,7 @@ namespace SabreTools.Reports.Formats
|
||||
/// <inheritdoc/>
|
||||
public override bool WriteToFile(string outfile, bool baddumpCol, bool nodumpCol, bool throwOnError = false)
|
||||
{
|
||||
InternalStopwatch watch = new InternalStopwatch($"Writing statistics to '{outfile}");
|
||||
InternalStopwatch watch = new($"Writing statistics to '{outfile}");
|
||||
|
||||
try
|
||||
{
|
||||
@@ -41,7 +41,7 @@ namespace SabreTools.Reports.Formats
|
||||
return false;
|
||||
}
|
||||
|
||||
SeparatedValueWriter svw = new SeparatedValueWriter(fs, Encoding.UTF8)
|
||||
SeparatedValueWriter svw = new(fs, Encoding.UTF8)
|
||||
{
|
||||
Separator = _separator,
|
||||
Quotes = true,
|
||||
|
||||
@@ -27,7 +27,7 @@ namespace SabreTools.Reports.Formats
|
||||
/// <inheritdoc/>
|
||||
public override bool WriteToFile(string outfile, bool baddumpCol, bool nodumpCol, bool throwOnError = false)
|
||||
{
|
||||
InternalStopwatch watch = new InternalStopwatch($"Writing statistics to '{outfile}");
|
||||
InternalStopwatch watch = new($"Writing statistics to '{outfile}");
|
||||
|
||||
try
|
||||
{
|
||||
@@ -39,7 +39,7 @@ namespace SabreTools.Reports.Formats
|
||||
return false;
|
||||
}
|
||||
|
||||
StreamWriter sw = new StreamWriter(fs);
|
||||
StreamWriter sw = new(fs);
|
||||
|
||||
// Now process each of the statistics
|
||||
for (int i = 0; i < Statistics.Count; i++)
|
||||
|
||||
Reference in New Issue
Block a user