Code formatting and usings cleanup

This commit is contained in:
Matt Nadareski
2024-07-17 15:46:42 -04:00
parent 5c179bbf8b
commit 8344e9ae9b
63 changed files with 49 additions and 104 deletions

View File

@@ -1429,6 +1429,6 @@ namespace SabreTools.DatFiles
} }
} }
#endregion #endregion
} }
} }

View File

@@ -7,7 +7,6 @@ using System.Collections.Generic;
using System.IO; using System.IO;
using System.Linq; using System.Linq;
using System.Text.RegularExpressions; using System.Text.RegularExpressions;
#if NET40_OR_GREATER || NETCOREAPP #if NET40_OR_GREATER || NETCOREAPP
using System.Threading.Tasks; using System.Threading.Tasks;
#endif #endif

View File

@@ -1,6 +1,5 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using SabreTools.Core;
using SabreTools.Core.Filter; using SabreTools.Core.Filter;
using SabreTools.Core.Tools; using SabreTools.Core.Tools;
using SabreTools.DatItems; using SabreTools.DatItems;

View File

@@ -1,6 +1,5 @@
using System.Xml.Serialization; using System.Xml.Serialization;
using Newtonsoft.Json; using Newtonsoft.Json;
using SabreTools.Core;
namespace SabreTools.DatItems.Formats namespace SabreTools.DatItems.Formats
{ {

View File

@@ -1,6 +1,5 @@
using System.Xml.Serialization; using System.Xml.Serialization;
using Newtonsoft.Json; using Newtonsoft.Json;
using SabreTools.Core;
namespace SabreTools.DatItems.Formats namespace SabreTools.DatItems.Formats
{ {

View File

@@ -1,6 +1,5 @@
using System.Xml.Serialization; using System.Xml.Serialization;
using Newtonsoft.Json; using Newtonsoft.Json;
using SabreTools.Core;
namespace SabreTools.DatItems.Formats namespace SabreTools.DatItems.Formats
{ {

View File

@@ -1,6 +1,5 @@
using System.Xml.Serialization; using System.Xml.Serialization;
using Newtonsoft.Json; using Newtonsoft.Json;
using SabreTools.Core;
namespace SabreTools.DatItems.Formats namespace SabreTools.DatItems.Formats
{ {

View File

@@ -1,6 +1,5 @@
using System.Xml.Serialization; using System.Xml.Serialization;
using Newtonsoft.Json; using Newtonsoft.Json;
using SabreTools.Core;
using SabreTools.Core.Tools; using SabreTools.Core.Tools;
namespace SabreTools.DatItems.Formats namespace SabreTools.DatItems.Formats

View File

@@ -1,6 +1,5 @@
using System.Xml.Serialization; using System.Xml.Serialization;
using Newtonsoft.Json; using Newtonsoft.Json;
using SabreTools.Core;
namespace SabreTools.DatItems.Formats namespace SabreTools.DatItems.Formats
{ {

View File

@@ -1,6 +1,5 @@
using System.Xml.Serialization; using System.Xml.Serialization;
using Newtonsoft.Json; using Newtonsoft.Json;
using SabreTools.Core;
namespace SabreTools.DatItems.Formats namespace SabreTools.DatItems.Formats
{ {

View File

@@ -1,6 +1,5 @@
using System.Xml.Serialization; using System.Xml.Serialization;
using Newtonsoft.Json; using Newtonsoft.Json;
using SabreTools.Core;
namespace SabreTools.DatItems.Formats namespace SabreTools.DatItems.Formats
{ {

View File

@@ -1,6 +1,5 @@
using System.Xml.Serialization; using System.Xml.Serialization;
using Newtonsoft.Json; using Newtonsoft.Json;
using SabreTools.Core;
namespace SabreTools.DatItems.Formats namespace SabreTools.DatItems.Formats
{ {

View File

@@ -1,6 +1,5 @@
using System.Xml.Serialization; using System.Xml.Serialization;
using Newtonsoft.Json; using Newtonsoft.Json;
using SabreTools.Core;
namespace SabreTools.DatItems.Formats namespace SabreTools.DatItems.Formats
{ {

View File

@@ -1,6 +1,5 @@
using System.Xml.Serialization; using System.Xml.Serialization;
using Newtonsoft.Json; using Newtonsoft.Json;
using SabreTools.Core;
namespace SabreTools.DatItems.Formats namespace SabreTools.DatItems.Formats
{ {

View File

@@ -1,6 +1,5 @@
using System.Xml.Serialization; using System.Xml.Serialization;
using Newtonsoft.Json; using Newtonsoft.Json;
using SabreTools.Core;
namespace SabreTools.DatItems.Formats namespace SabreTools.DatItems.Formats
{ {

View File

@@ -1,6 +1,5 @@
using System.Xml.Serialization; using System.Xml.Serialization;
using Newtonsoft.Json; using Newtonsoft.Json;
using SabreTools.Core;
namespace SabreTools.DatItems.Formats namespace SabreTools.DatItems.Formats
{ {

View File

@@ -1,6 +1,5 @@
using System.Xml.Serialization; using System.Xml.Serialization;
using Newtonsoft.Json; using Newtonsoft.Json;
using SabreTools.Core;
namespace SabreTools.DatItems.Formats namespace SabreTools.DatItems.Formats
{ {

View File

@@ -1,6 +1,5 @@
using System.Xml.Serialization; using System.Xml.Serialization;
using Newtonsoft.Json; using Newtonsoft.Json;
using SabreTools.Core;
namespace SabreTools.DatItems.Formats namespace SabreTools.DatItems.Formats
{ {

View File

@@ -1,6 +1,5 @@
using System.Xml.Serialization; using System.Xml.Serialization;
using Newtonsoft.Json; using Newtonsoft.Json;
using SabreTools.Core;
namespace SabreTools.DatItems.Formats namespace SabreTools.DatItems.Formats
{ {

View File

@@ -1,6 +1,5 @@
using System.Xml.Serialization; using System.Xml.Serialization;
using Newtonsoft.Json; using Newtonsoft.Json;
using SabreTools.Core;
namespace SabreTools.DatItems.Formats namespace SabreTools.DatItems.Formats
{ {

View File

@@ -1,6 +1,5 @@
using System.Xml.Serialization; using System.Xml.Serialization;
using Newtonsoft.Json; using Newtonsoft.Json;
using SabreTools.Core;
namespace SabreTools.DatItems.Formats namespace SabreTools.DatItems.Formats
{ {

View File

@@ -1,6 +1,5 @@
using System.Xml.Serialization; using System.Xml.Serialization;
using Newtonsoft.Json; using Newtonsoft.Json;
using SabreTools.Core;
using SabreTools.Core.Tools; using SabreTools.Core.Tools;
namespace SabreTools.DatItems.Formats namespace SabreTools.DatItems.Formats

View File

@@ -1,6 +1,5 @@
using System.Xml.Serialization; using System.Xml.Serialization;
using Newtonsoft.Json; using Newtonsoft.Json;
using SabreTools.Core;
namespace SabreTools.DatItems.Formats namespace SabreTools.DatItems.Formats
{ {

View File

@@ -1,6 +1,5 @@
using System.Xml.Serialization; using System.Xml.Serialization;
using Newtonsoft.Json; using Newtonsoft.Json;
using SabreTools.Core;
namespace SabreTools.DatItems.Formats namespace SabreTools.DatItems.Formats
{ {

View File

@@ -1,6 +1,5 @@
using System.Xml.Serialization; using System.Xml.Serialization;
using Newtonsoft.Json; using Newtonsoft.Json;
using SabreTools.Core;
namespace SabreTools.DatItems.Formats namespace SabreTools.DatItems.Formats
{ {

View File

@@ -1,7 +1,6 @@
using System.Linq; using System.Linq;
using System.Xml.Serialization; using System.Xml.Serialization;
using Newtonsoft.Json; using Newtonsoft.Json;
using SabreTools.Core;
using SabreTools.Core.Tools; using SabreTools.Core.Tools;
using SabreTools.FileTypes; using SabreTools.FileTypes;
using SabreTools.Hashing; using SabreTools.Hashing;

View File

@@ -1,6 +1,5 @@
using System.Xml.Serialization; using System.Xml.Serialization;
using Newtonsoft.Json; using Newtonsoft.Json;
using SabreTools.Core;
namespace SabreTools.DatItems.Formats namespace SabreTools.DatItems.Formats
{ {

View File

@@ -1,6 +1,5 @@
using System.Xml.Serialization; using System.Xml.Serialization;
using Newtonsoft.Json; using Newtonsoft.Json;
using SabreTools.Core;
namespace SabreTools.DatItems.Formats namespace SabreTools.DatItems.Formats
{ {

View File

@@ -1,6 +1,5 @@
using System.Xml.Serialization; using System.Xml.Serialization;
using Newtonsoft.Json; using Newtonsoft.Json;
using SabreTools.Core;
namespace SabreTools.DatItems.Formats namespace SabreTools.DatItems.Formats
{ {

View File

@@ -1,6 +1,5 @@
using System.Xml.Serialization; using System.Xml.Serialization;
using Newtonsoft.Json; using Newtonsoft.Json;
using SabreTools.Core;
namespace SabreTools.DatItems.Formats namespace SabreTools.DatItems.Formats
{ {

View File

@@ -1,6 +1,5 @@
using System.Xml.Serialization; using System.Xml.Serialization;
using Newtonsoft.Json; using Newtonsoft.Json;
using SabreTools.Core;
namespace SabreTools.DatItems.Formats namespace SabreTools.DatItems.Formats
{ {

View File

@@ -1,6 +1,5 @@
using System.Xml.Serialization; using System.Xml.Serialization;
using Newtonsoft.Json; using Newtonsoft.Json;
using SabreTools.Core;
namespace SabreTools.DatItems.Formats namespace SabreTools.DatItems.Formats
{ {

View File

@@ -1,6 +1,5 @@
using System.Xml.Serialization; using System.Xml.Serialization;
using Newtonsoft.Json; using Newtonsoft.Json;
using SabreTools.Core;
namespace SabreTools.DatItems.Formats namespace SabreTools.DatItems.Formats
{ {

View File

@@ -1,6 +1,5 @@
using System.Xml.Serialization; using System.Xml.Serialization;
using Newtonsoft.Json; using Newtonsoft.Json;
using SabreTools.Core;
namespace SabreTools.DatItems.Formats namespace SabreTools.DatItems.Formats
{ {

View File

@@ -1,6 +1,5 @@
using System.Xml.Serialization; using System.Xml.Serialization;
using Newtonsoft.Json; using Newtonsoft.Json;
using SabreTools.Core;
using SabreTools.Core.Tools; using SabreTools.Core.Tools;
// TODO: Add item mappings for all fields // TODO: Add item mappings for all fields

View File

@@ -1,6 +1,5 @@
using System.Xml.Serialization; using System.Xml.Serialization;
using Newtonsoft.Json; using Newtonsoft.Json;
using SabreTools.Core;
namespace SabreTools.DatItems.Formats namespace SabreTools.DatItems.Formats
{ {

View File

@@ -1,6 +1,5 @@
using System.Xml.Serialization; using System.Xml.Serialization;
using Newtonsoft.Json; using Newtonsoft.Json;
using SabreTools.Core;
using SabreTools.Core.Tools; using SabreTools.Core.Tools;
// TODO: Add item mappings for all fields // TODO: Add item mappings for all fields

View File

@@ -1,6 +1,5 @@
using System.Xml.Serialization; using System.Xml.Serialization;
using Newtonsoft.Json; using Newtonsoft.Json;
using SabreTools.Core;
namespace SabreTools.DatItems.Formats namespace SabreTools.DatItems.Formats
{ {

View File

@@ -1,6 +1,5 @@
using System.Xml.Serialization; using System.Xml.Serialization;
using Newtonsoft.Json; using Newtonsoft.Json;
using SabreTools.Core;
namespace SabreTools.DatItems.Formats namespace SabreTools.DatItems.Formats
{ {

View File

@@ -1,6 +1,5 @@
using System.Xml.Serialization; using System.Xml.Serialization;
using Newtonsoft.Json; using Newtonsoft.Json;
using SabreTools.Core;
namespace SabreTools.DatItems.Formats namespace SabreTools.DatItems.Formats
{ {

View File

@@ -1,6 +1,5 @@
using System.Xml.Serialization; using System.Xml.Serialization;
using Newtonsoft.Json; using Newtonsoft.Json;
using SabreTools.Core;
namespace SabreTools.DatItems.Formats namespace SabreTools.DatItems.Formats
{ {

View File

@@ -1,6 +1,5 @@
using System.Xml.Serialization; using System.Xml.Serialization;
using Newtonsoft.Json; using Newtonsoft.Json;
using SabreTools.Core;
namespace SabreTools.DatItems.Formats namespace SabreTools.DatItems.Formats
{ {

View File

@@ -1,6 +1,5 @@
using System.Xml.Serialization; using System.Xml.Serialization;
using Newtonsoft.Json; using Newtonsoft.Json;
using SabreTools.Core;
using SabreTools.Core.Tools; using SabreTools.Core.Tools;
// TODO: Add item mappings for all fields // TODO: Add item mappings for all fields

View File

@@ -3,8 +3,6 @@ using System.IO;
using System.Linq; using System.Linq;
#if NET40_OR_GREATER || NETCOREAPP #if NET40_OR_GREATER || NETCOREAPP
using System.Threading.Tasks; using System.Threading.Tasks;
using Microsoft.VisualBasic;
#endif #endif
using SabreTools.Core; using SabreTools.Core;
using SabreTools.DatFiles; using SabreTools.DatFiles;

View File

@@ -1,4 +1,3 @@
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.IO; using System.IO;
using System.Linq; using System.Linq;

View File

@@ -6,7 +6,6 @@ using System.Net;
#if NET40_OR_GREATER || NETCOREAPP #if NET40_OR_GREATER || NETCOREAPP
using System.Threading.Tasks; using System.Threading.Tasks;
#endif #endif
using SabreTools.Core;
using SabreTools.DatFiles; using SabreTools.DatFiles;
using SabreTools.IO; using SabreTools.IO;
using SabreTools.IO.Extensions; using SabreTools.IO.Extensions;

View File

@@ -3,7 +3,6 @@ using System.Collections.Generic;
#if NET40_OR_GREATER || NETCOREAPP #if NET40_OR_GREATER || NETCOREAPP
using System.Threading.Tasks; using System.Threading.Tasks;
#endif #endif
using SabreTools.Core;
using SabreTools.DatFiles; using SabreTools.DatFiles;
using SabreTools.DatItems; using SabreTools.DatItems;
using SabreTools.IO.Extensions; using SabreTools.IO.Extensions;
@@ -167,14 +166,14 @@ namespace SabreTools.DatTools
{ {
if (string.IsNullOrEmpty(datFile.Header.GetStringFieldValue(Models.Metadata.Header.NameKey)) && string.IsNullOrEmpty(datFile.Header.GetStringFieldValue(Models.Metadata.Header.DescriptionKey))) if (string.IsNullOrEmpty(datFile.Header.GetStringFieldValue(Models.Metadata.Header.NameKey)) && string.IsNullOrEmpty(datFile.Header.GetStringFieldValue(Models.Metadata.Header.DescriptionKey)))
{ {
datFile.Header.SetFieldValue<string?>(DatHeader.FileNameKey,"Default"); datFile.Header.SetFieldValue<string?>(DatHeader.FileNameKey, "Default");
datFile.Header.SetFieldValue<string?>(Models.Metadata.Header.NameKey, "Default"); datFile.Header.SetFieldValue<string?>(Models.Metadata.Header.NameKey, "Default");
datFile.Header.SetFieldValue<string?>(Models.Metadata.Header.DescriptionKey, "Default"); datFile.Header.SetFieldValue<string?>(Models.Metadata.Header.DescriptionKey, "Default");
} }
else if (string.IsNullOrEmpty(datFile.Header.GetStringFieldValue(Models.Metadata.Header.NameKey)) && !string.IsNullOrEmpty(datFile.Header.GetStringFieldValue(Models.Metadata.Header.DescriptionKey))) else if (string.IsNullOrEmpty(datFile.Header.GetStringFieldValue(Models.Metadata.Header.NameKey)) && !string.IsNullOrEmpty(datFile.Header.GetStringFieldValue(Models.Metadata.Header.DescriptionKey)))
{ {
datFile.Header.SetFieldValue<string?>(DatHeader.FileNameKey,datFile.Header.GetStringFieldValue(Models.Metadata.Header.DescriptionKey)); datFile.Header.SetFieldValue<string?>(DatHeader.FileNameKey, datFile.Header.GetStringFieldValue(Models.Metadata.Header.DescriptionKey));
datFile.Header.SetFieldValue<string?>(Models.Metadata.Header.NameKey, datFile.Header.GetStringFieldValue(Models.Metadata.Header.DescriptionKey)); datFile.Header.SetFieldValue<string?>(Models.Metadata.Header.NameKey, datFile.Header.GetStringFieldValue(Models.Metadata.Header.DescriptionKey));
} }

View File

@@ -1,6 +1,5 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.IO; using System.IO;
using SabreTools.FileTypes.Archives; using SabreTools.FileTypes.Archives;
namespace SabreTools.FileTypes namespace SabreTools.FileTypes

View File

@@ -1,6 +1,5 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using SabreTools.Core;
using SabreTools.Core.Tools; using SabreTools.Core.Tools;
using SabreTools.DatItems; using SabreTools.DatItems;
using SabreTools.DatItems.Formats; using SabreTools.DatItems.Formats;

View File

@@ -1,7 +1,6 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.IO; using System.IO;
using SabreTools.Logging; using SabreTools.Logging;
namespace SabreTools.Help namespace SabreTools.Help

View File

@@ -1,7 +1,5 @@
using System; using System;
using SabreTools.Core;
namespace SabreTools.Logging namespace SabreTools.Logging
{ {
/// <summary> /// <summary>

View File

@@ -1,5 +1,4 @@
using System; using System.Collections.Generic;
using System.Collections.Generic;
using System.IO; using System.IO;
using Microsoft.Data.Sqlite; using Microsoft.Data.Sqlite;
using SabreTools.Core; using SabreTools.Core;

View File

@@ -3,7 +3,6 @@ using System.Collections.Generic;
using System.IO; using System.IO;
using System.Linq; using System.Linq;
using System.Text.RegularExpressions; using System.Text.RegularExpressions;
using SabreTools.Core;
using SabreTools.Core.Filter; using SabreTools.Core.Filter;
using SabreTools.Core.Tools; using SabreTools.Core.Tools;
using SabreTools.DatFiles; using SabreTools.DatFiles;

View File

@@ -1,6 +1,5 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.IO; using System.IO;
using SabreTools.DatTools; using SabreTools.DatTools;
using SabreTools.Help; using SabreTools.Help;