Fix namespaces
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
namespace Types.Annotations;
|
||||
namespace Core.Annotations;
|
||||
|
||||
[AttributeUsage(AttributeTargets.Class)]
|
||||
public class Injectable(InjectionType injectionType = InjectionType.Scoped, Type? type = null) : Attribute
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using Types.Annotations;
|
||||
using Core.Annotations;
|
||||
|
||||
namespace Types.Context;
|
||||
namespace Core.Context;
|
||||
|
||||
[Injectable(InjectionType.Singleton)]
|
||||
public class ApplicationContext
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace Types.Context;
|
||||
namespace Core.Context;
|
||||
|
||||
public class ContextVariable(object value, ContextVariableType contextVariableType)
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace Types.Context;
|
||||
namespace Core.Context;
|
||||
|
||||
public enum ContextVariableType
|
||||
{
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
<OutputType>Library</OutputType>
|
||||
<RootNamespace>Types</RootNamespace>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace Types.Models.Config;
|
||||
namespace Core.Models.Config;
|
||||
|
||||
public class HttpConfig
|
||||
{
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace Types.Models.Eft.Common.Tables;
|
||||
namespace Core.Models.Eft.Common.Tables;
|
||||
|
||||
public class BotBase
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace Types.Models.Eft.Common.Tables;
|
||||
namespace Core.Models.Eft.Common.Tables;
|
||||
|
||||
public class BotCore
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace Types.Models.Eft.Common.Tables;
|
||||
namespace Core.Models.Eft.Common.Tables;
|
||||
|
||||
public class BotType
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace Types.Models.Enums;
|
||||
namespace Core.Models.Enums;
|
||||
|
||||
public enum ConfigTypes
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace Types.Models.Logging;
|
||||
namespace Core.Models.Logging;
|
||||
|
||||
public enum LogBackgroundColor
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace Types.Models.Logging;
|
||||
namespace Core.Models.Logging;
|
||||
|
||||
public enum LogTextColor
|
||||
{
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace Types.Models.Spt.Bots;
|
||||
namespace Core.Models.Spt.Bots;
|
||||
|
||||
public class Bots
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace Types.Models.Spt.Server;
|
||||
namespace Core.Models.Spt.Server;
|
||||
|
||||
public class DatabaseTables
|
||||
{
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using Types.Models.Logging;
|
||||
using Core.Models.Logging;
|
||||
|
||||
namespace Types.Models.Utils;
|
||||
namespace Core.Models.Utils;
|
||||
|
||||
public interface ILogger
|
||||
{
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using Types.Annotations;
|
||||
using Core.Annotations;
|
||||
|
||||
namespace Types.Servers;
|
||||
namespace Core.Servers;
|
||||
|
||||
[Injectable(InjectionType.Singleton)]
|
||||
public class ConfigServer
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace Types.Servers;
|
||||
namespace Core.Servers;
|
||||
|
||||
public class DatabaseServer
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace Types.Servers.Http;
|
||||
namespace Core.Servers.Http;
|
||||
|
||||
public interface IHttpListener
|
||||
{
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using Types.Annotations;
|
||||
using Core.Annotations;
|
||||
|
||||
namespace Types.Servers;
|
||||
namespace Core.Servers;
|
||||
|
||||
[Injectable(InjectionType.Singleton)]
|
||||
public class WebSocketServer
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace Types.Services;
|
||||
namespace Core.Services;
|
||||
|
||||
public class I18nService
|
||||
{
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace Types.Utils;
|
||||
namespace Core.Utils;
|
||||
|
||||
public class RandomUtil
|
||||
{
|
||||
|
||||
@@ -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
|
||||
/// </summary>
|
||||
/// <param name="number">The number to pad.</param>
|
||||
/// <returns>The padded number as a string.</returns>
|
||||
/// <exception cref="NotImplementedException"></exception>
|
||||
private static string Pad(int number)
|
||||
{
|
||||
return number.ToString().PadLeft(2, '0');
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
using Types.Annotations;
|
||||
using Types.Servers;
|
||||
using Core.Annotations;
|
||||
using Core.Servers;
|
||||
|
||||
namespace Server;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user