From f09cd50266f82c158ce5dcbebd23575cdcf1b650 Mon Sep 17 00:00:00 2001
From: Cj <161484149+CJ-SPT@users.noreply.github.com>
Date: Mon, 6 Jan 2025 01:43:58 -0500
Subject: [PATCH] Fix namespaces
---
Core/Annotations/Injectable.cs | 2 +-
Core/Context/ApplicationContext.cs | 4 ++--
Core/Context/ContextVariable.cs | 2 +-
Core/Context/ContextVariableType.cs | 2 +-
Core/Core.csproj | 1 -
Core/Models/Config/HttpConfig.cs | 2 +-
Core/Models/Eft/Common/Tables/BotBase.cs | 2 +-
Core/Models/Eft/Common/Tables/BotCore.cs | 2 +-
Core/Models/Eft/Common/Tables/BotType.cs | 2 +-
Core/Models/Enums/ConfigTypes.cs | 2 +-
Core/Models/Logging/LogBackgroundColor.cs | 2 +-
Core/Models/Logging/LogTextColor.cs | 2 +-
Core/Models/Spt/Bots/Bots.cs | 2 +-
Core/Models/Spt/Server/DatabaseTables.cs | 2 +-
Core/Models/Utils/ILogger.cs | 4 ++--
Core/Servers/ConfigServer.cs | 4 ++--
Core/Servers/DatabaseServer.cs | 2 +-
Core/Servers/Http/IHttpListener.cs | 2 +-
Core/Servers/HttpServer.cs | 15 ++++++++-------
Core/Servers/WebSocketServer.cs | 4 ++--
Core/Services/I18nService.cs | 2 +-
Core/Services/LocaleService.cs | 8 ++++----
Core/Services/LocalisationService.cs | 15 ++++++++-------
Core/Utils/HashUtil.cs | 4 ++--
Core/Utils/Logging/SimpleTextLogger.cs | 11 ++++++-----
Core/Utils/RandomUtil.cs | 2 +-
Core/Utils/TimeUtil.cs | 5 ++---
Server/Program.cs | 4 ++--
28 files changed, 56 insertions(+), 55 deletions(-)
diff --git a/Core/Annotations/Injectable.cs b/Core/Annotations/Injectable.cs
index 667d0fb2..86b1d906 100644
--- a/Core/Annotations/Injectable.cs
+++ b/Core/Annotations/Injectable.cs
@@ -1,4 +1,4 @@
-namespace Types.Annotations;
+namespace Core.Annotations;
[AttributeUsage(AttributeTargets.Class)]
public class Injectable(InjectionType injectionType = InjectionType.Scoped, Type? type = null) : Attribute
diff --git a/Core/Context/ApplicationContext.cs b/Core/Context/ApplicationContext.cs
index 51f2ce84..05b10522 100644
--- a/Core/Context/ApplicationContext.cs
+++ b/Core/Context/ApplicationContext.cs
@@ -1,6 +1,6 @@
-using Types.Annotations;
+using Core.Annotations;
-namespace Types.Context;
+namespace Core.Context;
[Injectable(InjectionType.Singleton)]
public class ApplicationContext
diff --git a/Core/Context/ContextVariable.cs b/Core/Context/ContextVariable.cs
index 7bea953c..3e79b5f0 100644
--- a/Core/Context/ContextVariable.cs
+++ b/Core/Context/ContextVariable.cs
@@ -1,4 +1,4 @@
-namespace Types.Context;
+namespace Core.Context;
public class ContextVariable(object value, ContextVariableType contextVariableType)
{
diff --git a/Core/Context/ContextVariableType.cs b/Core/Context/ContextVariableType.cs
index 0f64ca1b..409e7656 100644
--- a/Core/Context/ContextVariableType.cs
+++ b/Core/Context/ContextVariableType.cs
@@ -1,4 +1,4 @@
-namespace Types.Context;
+namespace Core.Context;
public enum ContextVariableType
{
diff --git a/Core/Core.csproj b/Core/Core.csproj
index c84e1b8b..aa09572c 100644
--- a/Core/Core.csproj
+++ b/Core/Core.csproj
@@ -5,7 +5,6 @@
enable
enable
Library
- Types
diff --git a/Core/Models/Config/HttpConfig.cs b/Core/Models/Config/HttpConfig.cs
index 71a1c612..b661f3b1 100644
--- a/Core/Models/Config/HttpConfig.cs
+++ b/Core/Models/Config/HttpConfig.cs
@@ -1,4 +1,4 @@
-namespace Types.Models.Config;
+namespace Core.Models.Config;
public class HttpConfig
{
diff --git a/Core/Models/Eft/Common/Tables/BotBase.cs b/Core/Models/Eft/Common/Tables/BotBase.cs
index f1b151c6..d77fd12a 100644
--- a/Core/Models/Eft/Common/Tables/BotBase.cs
+++ b/Core/Models/Eft/Common/Tables/BotBase.cs
@@ -1,6 +1,6 @@
using System.Text.Json.Serialization;
-namespace Types.Models.Eft.Common.Tables;
+namespace Core.Models.Eft.Common.Tables;
public class BotBase
{
diff --git a/Core/Models/Eft/Common/Tables/BotCore.cs b/Core/Models/Eft/Common/Tables/BotCore.cs
index 5d6c8952..38732b91 100644
--- a/Core/Models/Eft/Common/Tables/BotCore.cs
+++ b/Core/Models/Eft/Common/Tables/BotCore.cs
@@ -1,4 +1,4 @@
-namespace Types.Models.Eft.Common.Tables;
+namespace Core.Models.Eft.Common.Tables;
public class BotCore
{
diff --git a/Core/Models/Eft/Common/Tables/BotType.cs b/Core/Models/Eft/Common/Tables/BotType.cs
index baa8e24f..e9930fda 100644
--- a/Core/Models/Eft/Common/Tables/BotType.cs
+++ b/Core/Models/Eft/Common/Tables/BotType.cs
@@ -1,4 +1,4 @@
-namespace Types.Models.Eft.Common.Tables;
+namespace Core.Models.Eft.Common.Tables;
public class BotType
{
diff --git a/Core/Models/Enums/ConfigTypes.cs b/Core/Models/Enums/ConfigTypes.cs
index 822e6f27..66cfac6a 100644
--- a/Core/Models/Enums/ConfigTypes.cs
+++ b/Core/Models/Enums/ConfigTypes.cs
@@ -1,4 +1,4 @@
-namespace Types.Models.Enums;
+namespace Core.Models.Enums;
public enum ConfigTypes
{
diff --git a/Core/Models/Logging/LogBackgroundColor.cs b/Core/Models/Logging/LogBackgroundColor.cs
index 6ba9878d..08c5d2c8 100644
--- a/Core/Models/Logging/LogBackgroundColor.cs
+++ b/Core/Models/Logging/LogBackgroundColor.cs
@@ -1,4 +1,4 @@
-namespace Types.Models.Logging;
+namespace Core.Models.Logging;
public enum LogBackgroundColor
{
diff --git a/Core/Models/Logging/LogTextColor.cs b/Core/Models/Logging/LogTextColor.cs
index 4188878d..c2a76282 100644
--- a/Core/Models/Logging/LogTextColor.cs
+++ b/Core/Models/Logging/LogTextColor.cs
@@ -1,4 +1,4 @@
-namespace Types.Models.Logging;
+namespace Core.Models.Logging;
public enum LogTextColor
{
diff --git a/Core/Models/Spt/Bots/Bots.cs b/Core/Models/Spt/Bots/Bots.cs
index ae563b09..24605116 100644
--- a/Core/Models/Spt/Bots/Bots.cs
+++ b/Core/Models/Spt/Bots/Bots.cs
@@ -1,6 +1,6 @@
using System.Text.Json.Serialization;
-namespace Types.Models.Spt.Bots;
+namespace Core.Models.Spt.Bots;
public class Bots
{
diff --git a/Core/Models/Spt/Server/DatabaseTables.cs b/Core/Models/Spt/Server/DatabaseTables.cs
index eea46689..fa6eb47a 100644
--- a/Core/Models/Spt/Server/DatabaseTables.cs
+++ b/Core/Models/Spt/Server/DatabaseTables.cs
@@ -1,4 +1,4 @@
-namespace Types.Models.Spt.Server;
+namespace Core.Models.Spt.Server;
public class DatabaseTables
{
diff --git a/Core/Models/Utils/ILogger.cs b/Core/Models/Utils/ILogger.cs
index cd73d2f6..3554c800 100644
--- a/Core/Models/Utils/ILogger.cs
+++ b/Core/Models/Utils/ILogger.cs
@@ -1,6 +1,6 @@
-using Types.Models.Logging;
+using Core.Models.Logging;
-namespace Types.Models.Utils;
+namespace Core.Models.Utils;
public interface ILogger
{
diff --git a/Core/Servers/ConfigServer.cs b/Core/Servers/ConfigServer.cs
index cd471290..50813186 100644
--- a/Core/Servers/ConfigServer.cs
+++ b/Core/Servers/ConfigServer.cs
@@ -1,6 +1,6 @@
-using Types.Annotations;
+using Core.Annotations;
-namespace Types.Servers;
+namespace Core.Servers;
[Injectable(InjectionType.Singleton)]
public class ConfigServer
diff --git a/Core/Servers/DatabaseServer.cs b/Core/Servers/DatabaseServer.cs
index 7045e67d..ea6a69a4 100644
--- a/Core/Servers/DatabaseServer.cs
+++ b/Core/Servers/DatabaseServer.cs
@@ -1,4 +1,4 @@
-namespace Types.Servers;
+namespace Core.Servers;
public class DatabaseServer
{
diff --git a/Core/Servers/Http/IHttpListener.cs b/Core/Servers/Http/IHttpListener.cs
index 4a74d910..5161850c 100644
--- a/Core/Servers/Http/IHttpListener.cs
+++ b/Core/Servers/Http/IHttpListener.cs
@@ -1,4 +1,4 @@
-namespace Types.Servers.Http;
+namespace Core.Servers.Http;
public interface IHttpListener
{
diff --git a/Core/Servers/HttpServer.cs b/Core/Servers/HttpServer.cs
index d3135cb1..c74ccfd0 100644
--- a/Core/Servers/HttpServer.cs
+++ b/Core/Servers/HttpServer.cs
@@ -1,13 +1,14 @@
using System.Net.WebSockets;
+using Core.Context;
+using Core.Models.Config;
+using Core.Servers.Http;
+using Core.Services;
using Microsoft.Extensions.Primitives;
-using Types.Annotations;
-using Types.Context;
-using Types.Models.Config;
-using Types.Servers.Http;
-using Types.Services;
-using ILogger = Types.Models.Utils.ILogger;
+using Core.Annotations;
+using ILogger = Core.Models.Utils.ILogger;
+using Utils_ILogger = Core.Models.Utils.ILogger;
-namespace Types.Servers;
+namespace Core.Servers;
[Injectable(InjectionType.Singleton)]
public class HttpServer
diff --git a/Core/Servers/WebSocketServer.cs b/Core/Servers/WebSocketServer.cs
index 42ce2f9e..5ec5648b 100644
--- a/Core/Servers/WebSocketServer.cs
+++ b/Core/Servers/WebSocketServer.cs
@@ -1,6 +1,6 @@
-using Types.Annotations;
+using Core.Annotations;
-namespace Types.Servers;
+namespace Core.Servers;
[Injectable(InjectionType.Singleton)]
public class WebSocketServer
diff --git a/Core/Services/I18nService.cs b/Core/Services/I18nService.cs
index bc31e90a..e508af5a 100644
--- a/Core/Services/I18nService.cs
+++ b/Core/Services/I18nService.cs
@@ -1,4 +1,4 @@
-namespace Types.Services;
+namespace Core.Services;
public class I18nService
{
diff --git a/Core/Services/LocaleService.cs b/Core/Services/LocaleService.cs
index c194da1c..ac343072 100644
--- a/Core/Services/LocaleService.cs
+++ b/Core/Services/LocaleService.cs
@@ -1,8 +1,8 @@
-using Types.Annotations;
-using Types.Servers;
-using ILogger = Types.Models.Utils.ILogger;
+using Core.Annotations;
+using Core.Servers;
+using ILogger = Core.Models.Utils.ILogger;
-namespace Types.Services;
+namespace Core.Services;
[Injectable(InjectionType.Singleton)]
public class LocaleService
diff --git a/Core/Services/LocalisationService.cs b/Core/Services/LocalisationService.cs
index 6ae740f8..87b0de06 100644
--- a/Core/Services/LocalisationService.cs
+++ b/Core/Services/LocalisationService.cs
@@ -1,21 +1,22 @@
-using Types.Annotations;
-using Types.Servers;
-using Types.Utils;
-using ILogger = Types.Models.Utils.ILogger;
+using Core.Utils;
+using Core.Annotations;
+using Core.Servers;
+using ILogger = Core.Models.Utils.ILogger;
+using Utils_ILogger = Core.Models.Utils.ILogger;
-namespace Types.Services;
+namespace Core.Services;
[Injectable(InjectionType.Singleton)]
public class LocalisationService
{
- private readonly ILogger _logger;
+ private readonly Utils_ILogger _logger;
private readonly RandomUtil _randomUtil;
private readonly DatabaseServer _databaseServer;
private readonly LocaleService _localeService;
private readonly I18nService _i18nService;
public LocalisationService(
- ILogger logger,
+ Utils_ILogger logger,
RandomUtil randomUtil,
DatabaseServer databaseServer,
LocaleService localeService
diff --git a/Core/Utils/HashUtil.cs b/Core/Utils/HashUtil.cs
index c0667142..b1a3318c 100644
--- a/Core/Utils/HashUtil.cs
+++ b/Core/Utils/HashUtil.cs
@@ -1,9 +1,9 @@
using System.Text;
using System.Text.RegularExpressions;
using System.Security.Cryptography;
-using Types.Annotations;
+using Core.Annotations;
-namespace Types.Utils;
+namespace Core.Utils;
[Injectable(InjectionType.Singleton)]
public partial class HashUtil
diff --git a/Core/Utils/Logging/SimpleTextLogger.cs b/Core/Utils/Logging/SimpleTextLogger.cs
index a09f55af..beb1f2a0 100644
--- a/Core/Utils/Logging/SimpleTextLogger.cs
+++ b/Core/Utils/Logging/SimpleTextLogger.cs
@@ -1,11 +1,12 @@
-using Types.Annotations;
-using Types.Models.Logging;
-using ILogger = Types.Models.Utils.ILogger;
+using Core.Models.Logging;
+using Core.Annotations;
+using ILogger = Core.Models.Utils.ILogger;
+using Utils_ILogger = Core.Models.Utils.ILogger;
-namespace Types.Utils.Logging;
+namespace Core.Utils.Logging;
[Injectable(InjectionType.Singleton)]
-public class SimpleTextLogger : ILogger
+public class SimpleTextLogger : Utils_ILogger
{
// TODO: for now we simplify the logger into this barebones console writer
public void WriteToLogFile(string data)
diff --git a/Core/Utils/RandomUtil.cs b/Core/Utils/RandomUtil.cs
index 73bc97f4..ded07f39 100644
--- a/Core/Utils/RandomUtil.cs
+++ b/Core/Utils/RandomUtil.cs
@@ -1,4 +1,4 @@
-namespace Types.Utils;
+namespace Core.Utils;
public class RandomUtil
{
diff --git a/Core/Utils/TimeUtil.cs b/Core/Utils/TimeUtil.cs
index b8621dce..94fcbb61 100644
--- a/Core/Utils/TimeUtil.cs
+++ b/Core/Utils/TimeUtil.cs
@@ -1,6 +1,6 @@
-using Types.Annotations;
+using Core.Annotations;
-namespace Types.Utils;
+namespace Core.Utils;
[Injectable(InjectionType.Singleton)]
public class TimeUtil
@@ -171,7 +171,6 @@ public class TimeUtil
///
/// The number to pad.
/// The padded number as a string.
- ///
private static string Pad(int number)
{
return number.ToString().PadLeft(2, '0');
diff --git a/Server/Program.cs b/Server/Program.cs
index 765f8ee9..6e6d8a21 100644
--- a/Server/Program.cs
+++ b/Server/Program.cs
@@ -1,5 +1,5 @@
-using Types.Annotations;
-using Types.Servers;
+using Core.Annotations;
+using Core.Servers;
namespace Server;