Fix namespaces

This commit is contained in:
Cj
2025-01-06 01:43:58 -05:00
parent eea0872aa7
commit f09cd50266
28 changed files with 56 additions and 55 deletions
+1 -1
View File
@@ -1,4 +1,4 @@
namespace Types.Annotations; namespace Core.Annotations;
[AttributeUsage(AttributeTargets.Class)] [AttributeUsage(AttributeTargets.Class)]
public class Injectable(InjectionType injectionType = InjectionType.Scoped, Type? type = null) : Attribute public class Injectable(InjectionType injectionType = InjectionType.Scoped, Type? type = null) : Attribute
+2 -2
View File
@@ -1,6 +1,6 @@
using Types.Annotations; using Core.Annotations;
namespace Types.Context; namespace Core.Context;
[Injectable(InjectionType.Singleton)] [Injectable(InjectionType.Singleton)]
public class ApplicationContext public class ApplicationContext
+1 -1
View File
@@ -1,4 +1,4 @@
namespace Types.Context; namespace Core.Context;
public class ContextVariable(object value, ContextVariableType contextVariableType) public class ContextVariable(object value, ContextVariableType contextVariableType)
{ {
+1 -1
View File
@@ -1,4 +1,4 @@
namespace Types.Context; namespace Core.Context;
public enum ContextVariableType public enum ContextVariableType
{ {
-1
View File
@@ -5,7 +5,6 @@
<ImplicitUsings>enable</ImplicitUsings> <ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable> <Nullable>enable</Nullable>
<OutputType>Library</OutputType> <OutputType>Library</OutputType>
<RootNamespace>Types</RootNamespace>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
+1 -1
View File
@@ -1,4 +1,4 @@
namespace Types.Models.Config; namespace Core.Models.Config;
public class HttpConfig public class HttpConfig
{ {
+1 -1
View File
@@ -1,6 +1,6 @@
using System.Text.Json.Serialization; using System.Text.Json.Serialization;
namespace Types.Models.Eft.Common.Tables; namespace Core.Models.Eft.Common.Tables;
public class BotBase public class BotBase
{ {
+1 -1
View File
@@ -1,4 +1,4 @@
namespace Types.Models.Eft.Common.Tables; namespace Core.Models.Eft.Common.Tables;
public class BotCore public class BotCore
{ {
+1 -1
View File
@@ -1,4 +1,4 @@
namespace Types.Models.Eft.Common.Tables; namespace Core.Models.Eft.Common.Tables;
public class BotType public class BotType
{ {
+1 -1
View File
@@ -1,4 +1,4 @@
namespace Types.Models.Enums; namespace Core.Models.Enums;
public enum ConfigTypes public enum ConfigTypes
{ {
+1 -1
View File
@@ -1,4 +1,4 @@
namespace Types.Models.Logging; namespace Core.Models.Logging;
public enum LogBackgroundColor public enum LogBackgroundColor
{ {
+1 -1
View File
@@ -1,4 +1,4 @@
namespace Types.Models.Logging; namespace Core.Models.Logging;
public enum LogTextColor public enum LogTextColor
{ {
+1 -1
View File
@@ -1,6 +1,6 @@
using System.Text.Json.Serialization; using System.Text.Json.Serialization;
namespace Types.Models.Spt.Bots; namespace Core.Models.Spt.Bots;
public class Bots public class Bots
{ {
+1 -1
View File
@@ -1,4 +1,4 @@
namespace Types.Models.Spt.Server; namespace Core.Models.Spt.Server;
public class DatabaseTables public class DatabaseTables
{ {
+2 -2
View File
@@ -1,6 +1,6 @@
using Types.Models.Logging; using Core.Models.Logging;
namespace Types.Models.Utils; namespace Core.Models.Utils;
public interface ILogger public interface ILogger
{ {
+2 -2
View File
@@ -1,6 +1,6 @@
using Types.Annotations; using Core.Annotations;
namespace Types.Servers; namespace Core.Servers;
[Injectable(InjectionType.Singleton)] [Injectable(InjectionType.Singleton)]
public class ConfigServer public class ConfigServer
+1 -1
View File
@@ -1,4 +1,4 @@
namespace Types.Servers; namespace Core.Servers;
public class DatabaseServer public class DatabaseServer
{ {
+1 -1
View File
@@ -1,4 +1,4 @@
namespace Types.Servers.Http; namespace Core.Servers.Http;
public interface IHttpListener public interface IHttpListener
{ {
+8 -7
View File
@@ -1,13 +1,14 @@
using System.Net.WebSockets; using System.Net.WebSockets;
using Core.Context;
using Core.Models.Config;
using Core.Servers.Http;
using Core.Services;
using Microsoft.Extensions.Primitives; using Microsoft.Extensions.Primitives;
using Types.Annotations; using Core.Annotations;
using Types.Context; using ILogger = Core.Models.Utils.ILogger;
using Types.Models.Config; using Utils_ILogger = Core.Models.Utils.ILogger;
using Types.Servers.Http;
using Types.Services;
using ILogger = Types.Models.Utils.ILogger;
namespace Types.Servers; namespace Core.Servers;
[Injectable(InjectionType.Singleton)] [Injectable(InjectionType.Singleton)]
public class HttpServer public class HttpServer
+2 -2
View File
@@ -1,6 +1,6 @@
using Types.Annotations; using Core.Annotations;
namespace Types.Servers; namespace Core.Servers;
[Injectable(InjectionType.Singleton)] [Injectable(InjectionType.Singleton)]
public class WebSocketServer public class WebSocketServer
+1 -1
View File
@@ -1,4 +1,4 @@
namespace Types.Services; namespace Core.Services;
public class I18nService public class I18nService
{ {
+4 -4
View File
@@ -1,8 +1,8 @@
using Types.Annotations; using Core.Annotations;
using Types.Servers; using Core.Servers;
using ILogger = Types.Models.Utils.ILogger; using ILogger = Core.Models.Utils.ILogger;
namespace Types.Services; namespace Core.Services;
[Injectable(InjectionType.Singleton)] [Injectable(InjectionType.Singleton)]
public class LocaleService public class LocaleService
+8 -7
View File
@@ -1,21 +1,22 @@
using Types.Annotations; using Core.Utils;
using Types.Servers; using Core.Annotations;
using Types.Utils; using Core.Servers;
using ILogger = Types.Models.Utils.ILogger; using ILogger = Core.Models.Utils.ILogger;
using Utils_ILogger = Core.Models.Utils.ILogger;
namespace Types.Services; namespace Core.Services;
[Injectable(InjectionType.Singleton)] [Injectable(InjectionType.Singleton)]
public class LocalisationService public class LocalisationService
{ {
private readonly ILogger _logger; private readonly Utils_ILogger _logger;
private readonly RandomUtil _randomUtil; private readonly RandomUtil _randomUtil;
private readonly DatabaseServer _databaseServer; private readonly DatabaseServer _databaseServer;
private readonly LocaleService _localeService; private readonly LocaleService _localeService;
private readonly I18nService _i18nService; private readonly I18nService _i18nService;
public LocalisationService( public LocalisationService(
ILogger logger, Utils_ILogger logger,
RandomUtil randomUtil, RandomUtil randomUtil,
DatabaseServer databaseServer, DatabaseServer databaseServer,
LocaleService localeService LocaleService localeService
+2 -2
View File
@@ -1,9 +1,9 @@
using System.Text; using System.Text;
using System.Text.RegularExpressions; using System.Text.RegularExpressions;
using System.Security.Cryptography; using System.Security.Cryptography;
using Types.Annotations; using Core.Annotations;
namespace Types.Utils; namespace Core.Utils;
[Injectable(InjectionType.Singleton)] [Injectable(InjectionType.Singleton)]
public partial class HashUtil public partial class HashUtil
+6 -5
View File
@@ -1,11 +1,12 @@
using Types.Annotations; using Core.Models.Logging;
using Types.Models.Logging; using Core.Annotations;
using ILogger = Types.Models.Utils.ILogger; using ILogger = Core.Models.Utils.ILogger;
using Utils_ILogger = Core.Models.Utils.ILogger;
namespace Types.Utils.Logging; namespace Core.Utils.Logging;
[Injectable(InjectionType.Singleton)] [Injectable(InjectionType.Singleton)]
public class SimpleTextLogger : ILogger public class SimpleTextLogger : Utils_ILogger
{ {
// TODO: for now we simplify the logger into this barebones console writer // TODO: for now we simplify the logger into this barebones console writer
public void WriteToLogFile(string data) public void WriteToLogFile(string data)
+1 -1
View File
@@ -1,4 +1,4 @@
namespace Types.Utils; namespace Core.Utils;
public class RandomUtil public class RandomUtil
{ {
+2 -3
View File
@@ -1,6 +1,6 @@
using Types.Annotations; using Core.Annotations;
namespace Types.Utils; namespace Core.Utils;
[Injectable(InjectionType.Singleton)] [Injectable(InjectionType.Singleton)]
public class TimeUtil public class TimeUtil
@@ -171,7 +171,6 @@ public class TimeUtil
/// </summary> /// </summary>
/// <param name="number">The number to pad.</param> /// <param name="number">The number to pad.</param>
/// <returns>The padded number as a string.</returns> /// <returns>The padded number as a string.</returns>
/// <exception cref="NotImplementedException"></exception>
private static string Pad(int number) private static string Pad(int number)
{ {
return number.ToString().PadLeft(2, '0'); return number.ToString().PadLeft(2, '0');
+2 -2
View File
@@ -1,5 +1,5 @@
using Types.Annotations; using Core.Annotations;
using Types.Servers; using Core.Servers;
namespace Server; namespace Server;