From 0ca4ec0887ca4982f562d8173daca8119a9f18d6 Mon Sep 17 00:00:00 2001 From: CWX Date: Sat, 11 Jan 2025 18:14:39 +0000 Subject: [PATCH] Inject controllers and services --- Core/Controllers/BotController.cs | 4 +++- Core/Controllers/BuildController.cs | 4 +++- Core/Controllers/ClientLogController.cs | 4 +++- Core/Controllers/CustomizationController.cs | 4 +++- Core/Controllers/DialogueController.cs | 2 ++ Core/Controllers/GameController.cs | 2 ++ Core/Controllers/HandBookController.cs | 5 ++++- Core/Controllers/HealthController.cs | 4 +++- Core/Controllers/HideoutController.cs | 5 ++++- Core/Controllers/InRaidController.cs | 2 ++ Core/Controllers/InsuranceController.cs | 5 ++++- Core/Controllers/InventoryController.cs | 5 ++++- Core/Controllers/LocationController.cs | 4 +++- Core/Controllers/MatchController.cs | 2 ++ Core/Controllers/NoteController.cs | 4 +++- Core/Controllers/NotifierController.cs | 4 +++- Core/Controllers/PresetController.cs | 5 ++++- Core/Controllers/PrestigeController.cs | 4 +++- Core/Controllers/QuestController.cs | 2 ++ Core/Controllers/RagfairController.cs | 2 ++ Core/Controllers/RepairController.cs | 4 +++- Core/Controllers/RepeatableQuestController.cs | 2 ++ Core/Controllers/TradeController.cs | 4 +++- Core/Controllers/TraderController.cs | 2 ++ Core/Controllers/WeatherController.cs | 4 +++- Core/Controllers/WishlistController.cs | 4 +++- Core/Services/AirdropService.cs | 4 +++- Core/Services/BackupService.cs | 5 ++++- Core/Services/BotEquipmentFilterService.cs | 4 +++- Core/Services/BotEquipmentModPoolService.cs | 4 +++- Core/Services/BotGenerationCacheService.cs | 4 +++- Core/Services/BotLootCacheService.cs | 4 +++- Core/Services/BotNameService.cs | 4 +++- Core/Services/BotWeaponModLimitService.cs | 4 +++- Core/Services/CircleOfCultistService.cs | 4 +++- Core/Services/CustomLocationWaveService.cs | 4 +++- Core/Services/FenceService.cs | 4 +++- Core/Services/GiftService.cs | 4 +++- Core/Services/I18nService.cs | 2 ++ Core/Services/InMemoryCacheService.cs | 5 ++++- Core/Services/InsuranceService.cs | 4 +++- Core/Services/ItemBaseClassService.cs | 4 +++- Core/Services/ItemFilterService.cs | 5 ++++- Core/Services/LegacyLocationLifecycleService.cs | 2 ++ Core/Services/LocationLifecycleService.cs | 4 +++- Core/Services/MapMarkerService.cs | 4 +++- Core/Services/MatchBotDeatilsCacheService.cs | 4 +++- Core/Services/MatchLocationService.cs | 5 ++++- Core/Services/ModCompilerService.cs | 5 ++++- Core/Services/NotificationService.cs | 4 +++- Core/Services/OpenZoneService.cs | 5 ++++- Core/Services/PaymentService.cs | 4 +++- Core/Services/PlayerService.cs | 4 +++- Core/Services/PmcChatResponseService.cs | 4 +++- Core/Services/PostDbLoadService.cs | 5 ++++- Core/Services/ProfileActivityService.cs | 5 ++++- Core/Services/ProfileFixerService.cs | 4 +++- Core/Services/RagfairCategoriesService.cs | 4 +++- Core/Services/RagfairLinkedItemService.cs | 4 +++- Core/Services/RagfairOfferService.cs | 4 +++- Core/Services/RagfairPriceService.cs | 4 +++- Core/Services/RagfairRequiredItemsService.cs | 4 +++- Core/Services/RagfairTaxService.cs | 4 +++- Core/Services/RaidTimeAdjustmentService.cs | 4 +++- Core/Services/RaidWeatherService.cs | 4 +++- Core/Services/RepairService.cs | 2 ++ Core/Services/SeasonalEventService.cs | 4 +++- Core/Services/TraderAssortService.cs | 4 +++- Core/Services/TraderPurchasePersisterService.cs | 4 +++- Server/user/profiles/6781aa7c00037bbc69469ef8.json | 0 70 files changed, 209 insertions(+), 58 deletions(-) create mode 100644 Server/user/profiles/6781aa7c00037bbc69469ef8.json diff --git a/Core/Controllers/BotController.cs b/Core/Controllers/BotController.cs index 7e9b37c8..f6435cc4 100644 --- a/Core/Controllers/BotController.cs +++ b/Core/Controllers/BotController.cs @@ -1,4 +1,5 @@ -using Core.Context; +using Core.Annotations; +using Core.Context; using Core.Generators; using Core.Helpers; using Core.Models.Common; @@ -18,6 +19,7 @@ using ILogger = Core.Models.Utils.ILogger; namespace Core.Controllers; +[Injectable] public class BotController { protected ILogger _logger; diff --git a/Core/Controllers/BuildController.cs b/Core/Controllers/BuildController.cs index ec6eb832..19cbd15a 100644 --- a/Core/Controllers/BuildController.cs +++ b/Core/Controllers/BuildController.cs @@ -1,9 +1,11 @@ +using Core.Annotations; using Core.Models.Eft.Builds; using Core.Models.Eft.PresetBuild; using Core.Models.Eft.Profile; namespace Core.Controllers; +[Injectable] public class BuildController { /// @@ -65,4 +67,4 @@ public class BuildController { throw new NotImplementedException(); } -} \ No newline at end of file +} diff --git a/Core/Controllers/ClientLogController.cs b/Core/Controllers/ClientLogController.cs index 5be6b01c..4c12f13c 100644 --- a/Core/Controllers/ClientLogController.cs +++ b/Core/Controllers/ClientLogController.cs @@ -1,7 +1,9 @@ +using Core.Annotations; using Core.Models.Spt.Logging; namespace Core.Controllers; +[Injectable] public class ClientLogController { /// @@ -12,4 +14,4 @@ public class ClientLogController { throw new NotImplementedException(); } -} \ No newline at end of file +} diff --git a/Core/Controllers/CustomizationController.cs b/Core/Controllers/CustomizationController.cs index 43765bb3..10b34c00 100644 --- a/Core/Controllers/CustomizationController.cs +++ b/Core/Controllers/CustomizationController.cs @@ -1,3 +1,4 @@ +using Core.Annotations; using Core.Models.Eft.Common; using Core.Models.Eft.Common.Tables; using Core.Models.Eft.Customization; @@ -7,6 +8,7 @@ using Core.Models.Eft.Profile; namespace Core.Controllers; +[Injectable] public class CustomizationController { /// @@ -140,4 +142,4 @@ public class CustomizationController { throw new NotImplementedException(); } -} \ No newline at end of file +} diff --git a/Core/Controllers/DialogueController.cs b/Core/Controllers/DialogueController.cs index 30300082..cd7d0e55 100644 --- a/Core/Controllers/DialogueController.cs +++ b/Core/Controllers/DialogueController.cs @@ -1,3 +1,4 @@ +using Core.Annotations; using Core.Models.Eft.Dialog; using Core.Models.Eft.HttpResponse; using Core.Models.Eft.Profile; @@ -5,6 +6,7 @@ using Core.Models.Enums; namespace Core.Controllers; +[Injectable] public class DialogueController { /// diff --git a/Core/Controllers/GameController.cs b/Core/Controllers/GameController.cs index 4a4aa0a9..d3bf02b8 100644 --- a/Core/Controllers/GameController.cs +++ b/Core/Controllers/GameController.cs @@ -1,9 +1,11 @@ +using Core.Annotations; using Core.Models.Eft.Common; using Core.Models.Eft.Game; using Core.Models.Eft.Profile; namespace Core.Controllers; +[Injectable] public class GameController { /// diff --git a/Core/Controllers/HandBookController.cs b/Core/Controllers/HandBookController.cs index ace2f35f..f3cc9a1d 100644 --- a/Core/Controllers/HandBookController.cs +++ b/Core/Controllers/HandBookController.cs @@ -1,10 +1,13 @@ +using Core.Annotations; + namespace Core.Controllers; // TODO: This seems unused, is it even needed? +[Injectable] public class HandBookController { public void Load() { throw new NotImplementedException(); } -} \ No newline at end of file +} diff --git a/Core/Controllers/HealthController.cs b/Core/Controllers/HealthController.cs index 45248b60..063cdd1e 100644 --- a/Core/Controllers/HealthController.cs +++ b/Core/Controllers/HealthController.cs @@ -1,9 +1,11 @@ +using Core.Annotations; using Core.Models.Eft.Common; using Core.Models.Eft.Health; using Core.Models.Eft.ItemEvent; namespace Core.Controllers; +[Injectable] public class HealthController { /// @@ -66,4 +68,4 @@ public class HealthController { throw new NotImplementedException(); } -} \ No newline at end of file +} diff --git a/Core/Controllers/HideoutController.cs b/Core/Controllers/HideoutController.cs index 9e503f5e..a62833ee 100644 --- a/Core/Controllers/HideoutController.cs +++ b/Core/Controllers/HideoutController.cs @@ -1,6 +1,9 @@ +using Core.Annotations; + namespace Core.Controllers; +[Injectable] public class HideoutController { // TODO -} \ No newline at end of file +} diff --git a/Core/Controllers/InRaidController.cs b/Core/Controllers/InRaidController.cs index 8aff9cbc..5c811274 100644 --- a/Core/Controllers/InRaidController.cs +++ b/Core/Controllers/InRaidController.cs @@ -1,3 +1,4 @@ +using Core.Annotations; using Core.Context; using Core.Helpers; using Core.Models.Eft.InRaid; @@ -9,6 +10,7 @@ using ILogger = Core.Models.Utils.ILogger; namespace Core.Controllers; +[Injectable] public class InRaidController { protected ILogger _logger; diff --git a/Core/Controllers/InsuranceController.cs b/Core/Controllers/InsuranceController.cs index fbc8d095..69cbce55 100644 --- a/Core/Controllers/InsuranceController.cs +++ b/Core/Controllers/InsuranceController.cs @@ -1,6 +1,9 @@ +using Core.Annotations; + namespace Core.Controllers; +[Injectable] public class InsuranceController { // TODO -} \ No newline at end of file +} diff --git a/Core/Controllers/InventoryController.cs b/Core/Controllers/InventoryController.cs index 8d8ff777..8b9d2d74 100644 --- a/Core/Controllers/InventoryController.cs +++ b/Core/Controllers/InventoryController.cs @@ -1,6 +1,9 @@ +using Core.Annotations; + namespace Core.Controllers; +[Injectable] public class InventoryController { // TODO -} \ No newline at end of file +} diff --git a/Core/Controllers/LocationController.cs b/Core/Controllers/LocationController.cs index 7b449981..4daa285e 100644 --- a/Core/Controllers/LocationController.cs +++ b/Core/Controllers/LocationController.cs @@ -1,8 +1,10 @@ +using Core.Annotations; using Core.Models.Eft.Common.Tables; using Core.Models.Eft.Location; namespace Core.Controllers; +[Injectable] public class LocationController { /// @@ -25,4 +27,4 @@ public class LocationController { throw new NotImplementedException(); } -} \ No newline at end of file +} diff --git a/Core/Controllers/MatchController.cs b/Core/Controllers/MatchController.cs index 742bda61..ea380088 100644 --- a/Core/Controllers/MatchController.cs +++ b/Core/Controllers/MatchController.cs @@ -1,7 +1,9 @@ +using Core.Annotations; using Core.Models.Eft.Match; namespace Core.Controllers; +[Injectable] public class MatchController { /// diff --git a/Core/Controllers/NoteController.cs b/Core/Controllers/NoteController.cs index caeff130..20caec50 100644 --- a/Core/Controllers/NoteController.cs +++ b/Core/Controllers/NoteController.cs @@ -1,9 +1,11 @@ +using Core.Annotations; using Core.Models.Eft.Common; using Core.Models.Eft.ItemEvent; using Core.Models.Eft.Notes; namespace Core.Controllers; +[Injectable] public class NoteController { /// @@ -50,4 +52,4 @@ public class NoteController { throw new NotImplementedException(); } -} \ No newline at end of file +} diff --git a/Core/Controllers/NotifierController.cs b/Core/Controllers/NotifierController.cs index 41b8b35e..0d622a29 100644 --- a/Core/Controllers/NotifierController.cs +++ b/Core/Controllers/NotifierController.cs @@ -1,7 +1,9 @@ +using Core.Annotations; using Core.Models.Eft.Notifier; namespace Core.Controllers; +[Injectable] public class NotifierController { /// @@ -36,4 +38,4 @@ public class NotifierController { throw new NotImplementedException(); } -} \ No newline at end of file +} diff --git a/Core/Controllers/PresetController.cs b/Core/Controllers/PresetController.cs index 3ae71f55..72d1d89e 100644 --- a/Core/Controllers/PresetController.cs +++ b/Core/Controllers/PresetController.cs @@ -1,5 +1,8 @@ +using Core.Annotations; + namespace Core.Controllers; +[Injectable] public class PresetController { /// @@ -9,4 +12,4 @@ public class PresetController { throw new NotImplementedException(); } -} \ No newline at end of file +} diff --git a/Core/Controllers/PrestigeController.cs b/Core/Controllers/PrestigeController.cs index e1519a88..301fa273 100644 --- a/Core/Controllers/PrestigeController.cs +++ b/Core/Controllers/PrestigeController.cs @@ -1,8 +1,10 @@ +using Core.Annotations; using Core.Models.Eft.Common; using Core.Models.Eft.Common.Tables; namespace Core.Controllers; +[Injectable] public class PrestigeController { /// @@ -30,4 +32,4 @@ public class PrestigeController { throw new NotImplementedException("Method not Implemented"); } -} \ No newline at end of file +} diff --git a/Core/Controllers/QuestController.cs b/Core/Controllers/QuestController.cs index 45eaf1ba..310e7a89 100644 --- a/Core/Controllers/QuestController.cs +++ b/Core/Controllers/QuestController.cs @@ -1,3 +1,4 @@ +using Core.Annotations; using Core.Models.Eft.Common; using Core.Models.Eft.Common.Tables; using Core.Models.Eft.ItemEvent; @@ -5,6 +6,7 @@ using Core.Models.Eft.Quests; namespace Core.Controllers; +[Injectable] public class QuestController { // TODO diff --git a/Core/Controllers/RagfairController.cs b/Core/Controllers/RagfairController.cs index fcdbb31f..9a52f1d3 100644 --- a/Core/Controllers/RagfairController.cs +++ b/Core/Controllers/RagfairController.cs @@ -1,9 +1,11 @@ +using Core.Annotations; using Core.Models.Eft.Common; using Core.Models.Eft.ItemEvent; using Core.Models.Eft.Ragfair; namespace Core.Controllers; +[Injectable] public class RagfairController { // TODO diff --git a/Core/Controllers/RepairController.cs b/Core/Controllers/RepairController.cs index 3a5c4f5c..c8a16fa7 100644 --- a/Core/Controllers/RepairController.cs +++ b/Core/Controllers/RepairController.cs @@ -1,9 +1,11 @@ +using Core.Annotations; using Core.Models.Eft.Common; using Core.Models.Eft.ItemEvent; using Core.Models.Eft.Repair; namespace Core.Controllers; +[Injectable] public class RepairController { /// @@ -38,4 +40,4 @@ public class RepairController { throw new NotImplementedException(); } -} \ No newline at end of file +} diff --git a/Core/Controllers/RepeatableQuestController.cs b/Core/Controllers/RepeatableQuestController.cs index 1cb9012b..f2f050f3 100644 --- a/Core/Controllers/RepeatableQuestController.cs +++ b/Core/Controllers/RepeatableQuestController.cs @@ -1,3 +1,4 @@ +using Core.Annotations; using Core.Models.Eft.Common; using Core.Models.Eft.Common.Tables; using Core.Models.Eft.ItemEvent; @@ -5,6 +6,7 @@ using Core.Models.Eft.Quests; namespace Core.Controllers; +[Injectable] public class RepeatableQuestController { // TODO diff --git a/Core/Controllers/TradeController.cs b/Core/Controllers/TradeController.cs index e8b157b3..adf2bc31 100644 --- a/Core/Controllers/TradeController.cs +++ b/Core/Controllers/TradeController.cs @@ -1,3 +1,4 @@ +using Core.Annotations; using Core.Models.Eft.Common; using Core.Models.Eft.Common.Tables; using Core.Models.Eft.ItemEvent; @@ -7,6 +8,7 @@ using Core.Models.Enums; namespace Core.Controllers; +[Injectable] public class TradeController { /// @@ -146,4 +148,4 @@ public class TradeController { throw new NotImplementedException(); } -} \ No newline at end of file +} diff --git a/Core/Controllers/TraderController.cs b/Core/Controllers/TraderController.cs index 77316bae..d6e1bdad 100644 --- a/Core/Controllers/TraderController.cs +++ b/Core/Controllers/TraderController.cs @@ -1,8 +1,10 @@ +using Core.Annotations; using Core.Models.Eft.Common.Tables; using Core.Models.Eft.Game; namespace Core.Controllers; +[Injectable] public class TraderController { /// diff --git a/Core/Controllers/WeatherController.cs b/Core/Controllers/WeatherController.cs index 98088c77..db582754 100644 --- a/Core/Controllers/WeatherController.cs +++ b/Core/Controllers/WeatherController.cs @@ -1,8 +1,10 @@ +using Core.Annotations; using Core.Models.Eft.Weather; using Core.Models.Spt.Weather; namespace Core.Controllers; +[Injectable] public class WeatherController { /// @@ -23,4 +25,4 @@ public class WeatherController { throw new NotImplementedException(); } -} \ No newline at end of file +} diff --git a/Core/Controllers/WishlistController.cs b/Core/Controllers/WishlistController.cs index 936ee1df..760a3a8b 100644 --- a/Core/Controllers/WishlistController.cs +++ b/Core/Controllers/WishlistController.cs @@ -1,9 +1,11 @@ +using Core.Annotations; using Core.Models.Eft.Common; using Core.Models.Eft.ItemEvent; using Core.Models.Eft.Wishlist; namespace Core.Controllers; +[Injectable] public class WishlistController { /// @@ -50,4 +52,4 @@ public class WishlistController { throw new NotImplementedException(); } -} \ No newline at end of file +} diff --git a/Core/Services/AirdropService.cs b/Core/Services/AirdropService.cs index 44ac1a2e..bdba2fca 100644 --- a/Core/Services/AirdropService.cs +++ b/Core/Services/AirdropService.cs @@ -1,10 +1,12 @@ -using Core.Models.Eft.Common.Tables; +using Core.Annotations; +using Core.Models.Eft.Common.Tables; using Core.Models.Eft.Location; using Core.Models.Enums; using Core.Models.Spt.Services; namespace Core.Services; +[Injectable] public class AirdropService { public GetAirdropLootResponse GenerateCustomAirdropLoot(GetAirdropLootRequest request) diff --git a/Core/Services/BackupService.cs b/Core/Services/BackupService.cs index f06ed2fc..e2cbb2fa 100644 --- a/Core/Services/BackupService.cs +++ b/Core/Services/BackupService.cs @@ -1,5 +1,8 @@ -namespace Core.Services; +using Core.Annotations; +namespace Core.Services; + +[Injectable] public class BackupService { /** diff --git a/Core/Services/BotEquipmentFilterService.cs b/Core/Services/BotEquipmentFilterService.cs index ad9f407e..e088a562 100644 --- a/Core/Services/BotEquipmentFilterService.cs +++ b/Core/Services/BotEquipmentFilterService.cs @@ -1,9 +1,11 @@ -using Core.Models.Eft.Common.Tables; +using Core.Annotations; +using Core.Models.Eft.Common.Tables; using Core.Models.Spt.Bots; using Core.Models.Spt.Config; namespace Core.Services; +[Injectable(InjectionType.Singleton)] public class BotEquipmentFilterService { /// diff --git a/Core/Services/BotEquipmentModPoolService.cs b/Core/Services/BotEquipmentModPoolService.cs index 799bc57d..52b22597 100644 --- a/Core/Services/BotEquipmentModPoolService.cs +++ b/Core/Services/BotEquipmentModPoolService.cs @@ -1,7 +1,9 @@ -using Core.Models.Eft.Common.Tables; +using Core.Annotations; +using Core.Models.Eft.Common.Tables; namespace Core.Services; +[Injectable(InjectionType.Singleton)] public class BotEquipmentModPoolService { /** diff --git a/Core/Services/BotGenerationCacheService.cs b/Core/Services/BotGenerationCacheService.cs index a0ce0645..66a4b840 100644 --- a/Core/Services/BotGenerationCacheService.cs +++ b/Core/Services/BotGenerationCacheService.cs @@ -1,7 +1,9 @@ -using Core.Models.Eft.Common.Tables; +using Core.Annotations; +using Core.Models.Eft.Common.Tables; namespace Core.Services; +[Injectable(InjectionType.Singleton)] public class BotGenerationCacheService { /** diff --git a/Core/Services/BotLootCacheService.cs b/Core/Services/BotLootCacheService.cs index b07ba153..49d2a01a 100644 --- a/Core/Services/BotLootCacheService.cs +++ b/Core/Services/BotLootCacheService.cs @@ -1,9 +1,11 @@ -using Core.Models.Eft.Common.Tables; +using Core.Annotations; +using Core.Models.Eft.Common.Tables; using Core.Models.Spt.Bots; using Props = Core.Models.Eft.Common.Props; namespace Core.Services; +[Injectable(InjectionType.Singleton)] public class BotLootCacheService { /// diff --git a/Core/Services/BotNameService.cs b/Core/Services/BotNameService.cs index b6d87f9d..8e118135 100644 --- a/Core/Services/BotNameService.cs +++ b/Core/Services/BotNameService.cs @@ -1,8 +1,10 @@ -using Core.Models.Eft.Common.Tables; +using Core.Annotations; +using Core.Models.Eft.Common.Tables; using Core.Models.Spt.Bots; namespace Core.Services; +[Injectable(InjectionType.Singleton)] public class BotNameService { /// diff --git a/Core/Services/BotWeaponModLimitService.cs b/Core/Services/BotWeaponModLimitService.cs index 976e3d8b..18021ae8 100644 --- a/Core/Services/BotWeaponModLimitService.cs +++ b/Core/Services/BotWeaponModLimitService.cs @@ -1,8 +1,10 @@ -using Core.Models.Eft.Common.Tables; +using Core.Annotations; +using Core.Models.Eft.Common.Tables; using Core.Models.Spt.Bots; namespace Core.Services; +[Injectable(InjectionType.Singleton)] public class BotWeaponModLimitService { /// diff --git a/Core/Services/CircleOfCultistService.cs b/Core/Services/CircleOfCultistService.cs index df49080b..852285c4 100644 --- a/Core/Services/CircleOfCultistService.cs +++ b/Core/Services/CircleOfCultistService.cs @@ -1,4 +1,5 @@ -using Core.Models.Eft.Common; +using Core.Annotations; +using Core.Models.Eft.Common; using Core.Models.Eft.Common.Tables; using Core.Models.Eft.Hideout; using Core.Models.Eft.ItemEvent; @@ -8,6 +9,7 @@ using Hideout = Core.Models.Eft.Common.Tables.Hideout; namespace Core.Services; +[Injectable(InjectionType.Singleton)] public class CircleOfCultistService { /// diff --git a/Core/Services/CustomLocationWaveService.cs b/Core/Services/CustomLocationWaveService.cs index 3301a1c7..0e0621c1 100644 --- a/Core/Services/CustomLocationWaveService.cs +++ b/Core/Services/CustomLocationWaveService.cs @@ -1,7 +1,9 @@ -using Core.Models.Eft.Common; +using Core.Annotations; +using Core.Models.Eft.Common; namespace Core.Services; +[Injectable(InjectionType.Singleton)] public class CustomLocationWaveService { /// diff --git a/Core/Services/FenceService.cs b/Core/Services/FenceService.cs index d4537fe9..2333f341 100644 --- a/Core/Services/FenceService.cs +++ b/Core/Services/FenceService.cs @@ -1,10 +1,12 @@ -using Core.Models.Eft.Common; +using Core.Annotations; +using Core.Models.Eft.Common; using Core.Models.Eft.Common.Tables; using Core.Models.Spt.Config; using Core.Models.Spt.Fence; namespace Core.Services; +[Injectable(InjectionType.Singleton)] public class FenceService { /// diff --git a/Core/Services/GiftService.cs b/Core/Services/GiftService.cs index 11a2d3d0..d513f58b 100644 --- a/Core/Services/GiftService.cs +++ b/Core/Services/GiftService.cs @@ -1,8 +1,10 @@ -using Core.Models.Enums; +using Core.Annotations; +using Core.Models.Enums; using Core.Models.Spt.Config; namespace Core.Services; +[Injectable(InjectionType.Singleton)] public class GiftService { /** diff --git a/Core/Services/I18nService.cs b/Core/Services/I18nService.cs index 3b189e9d..f656d50f 100644 --- a/Core/Services/I18nService.cs +++ b/Core/Services/I18nService.cs @@ -1,8 +1,10 @@ using System.Text.Json; +using Core.Annotations; using Core.Utils; namespace Core.Services; +[Injectable(InjectionType.Singleton)] public class I18nService { private List _locales; diff --git a/Core/Services/InMemoryCacheService.cs b/Core/Services/InMemoryCacheService.cs index 5e891ddf..cda31ac6 100644 --- a/Core/Services/InMemoryCacheService.cs +++ b/Core/Services/InMemoryCacheService.cs @@ -1,5 +1,8 @@ -namespace Core.Services; +using Core.Annotations; +namespace Core.Services; + +[Injectable(InjectionType.Singleton)] public class InMemoryCacheService { // Store data into an in-memory object diff --git a/Core/Services/InsuranceService.cs b/Core/Services/InsuranceService.cs index 71005a82..f43233ff 100644 --- a/Core/Services/InsuranceService.cs +++ b/Core/Services/InsuranceService.cs @@ -1,9 +1,11 @@ -using Core.Models.Eft.Common; +using Core.Annotations; +using Core.Models.Eft.Common; using Core.Models.Eft.Common.Tables; using Core.Models.Spt.Services; namespace Core.Services; +[Injectable(InjectionType.Singleton)] public class InsuranceService { /// diff --git a/Core/Services/ItemBaseClassService.cs b/Core/Services/ItemBaseClassService.cs index a9efa4c0..d5f52823 100644 --- a/Core/Services/ItemBaseClassService.cs +++ b/Core/Services/ItemBaseClassService.cs @@ -1,7 +1,9 @@ -using Core.Models.Eft.Common.Tables; +using Core.Annotations; +using Core.Models.Eft.Common.Tables; namespace Core.Services; +[Injectable(InjectionType.Singleton)] public class ItemBaseClassService { /** diff --git a/Core/Services/ItemFilterService.cs b/Core/Services/ItemFilterService.cs index cd11223d..ed6a865f 100644 --- a/Core/Services/ItemFilterService.cs +++ b/Core/Services/ItemFilterService.cs @@ -1,5 +1,8 @@ -namespace Core.Services; +using Core.Annotations; +namespace Core.Services; + +[Injectable(InjectionType.Singleton)] public class ItemFilterService { /** diff --git a/Core/Services/LegacyLocationLifecycleService.cs b/Core/Services/LegacyLocationLifecycleService.cs index 54675638..6c2f3b02 100644 --- a/Core/Services/LegacyLocationLifecycleService.cs +++ b/Core/Services/LegacyLocationLifecycleService.cs @@ -1,9 +1,11 @@ using System.Text.Json.Serialization; +using Core.Annotations; using Core.Models.Eft.Common; using Core.Models.Eft.Match; namespace Core.Services; +[Injectable(InjectionType.Singleton)] public class LegacyLocationLifecycleService { /// diff --git a/Core/Services/LocationLifecycleService.cs b/Core/Services/LocationLifecycleService.cs index 4fe65e52..faf24bab 100644 --- a/Core/Services/LocationLifecycleService.cs +++ b/Core/Services/LocationLifecycleService.cs @@ -1,9 +1,11 @@ -using Core.Models.Eft.Common; +using Core.Annotations; +using Core.Models.Eft.Common; using Core.Models.Eft.Common.Tables; using Core.Models.Eft.Match; namespace Core.Services; +[Injectable(InjectionType.Singleton)] public class LocationLifecycleService { /** Handle client/match/local/start */ diff --git a/Core/Services/MapMarkerService.cs b/Core/Services/MapMarkerService.cs index e516ef5a..00d40e1f 100644 --- a/Core/Services/MapMarkerService.cs +++ b/Core/Services/MapMarkerService.cs @@ -1,4 +1,5 @@ -using Core.Models.Eft.Common; +using Core.Annotations; +using Core.Models.Eft.Common; using Core.Models.Eft.Common.Tables; using Core.Models.Eft.Inventory; using Core.Models.Eft.Profile; @@ -7,6 +8,7 @@ using Core.Models.Spt.Dialog; namespace Core.Services; +[Injectable(InjectionType.Singleton)] public class MapMarkerService { /// diff --git a/Core/Services/MatchBotDeatilsCacheService.cs b/Core/Services/MatchBotDeatilsCacheService.cs index a7d4fd21..076f6bf7 100644 --- a/Core/Services/MatchBotDeatilsCacheService.cs +++ b/Core/Services/MatchBotDeatilsCacheService.cs @@ -1,7 +1,9 @@ -using Core.Models.Eft.Common.Tables; +using Core.Annotations; +using Core.Models.Eft.Common.Tables; namespace Core.Services; +[Injectable(InjectionType.Singleton)] public class MatchBotDeatilsCacheService { /// diff --git a/Core/Services/MatchLocationService.cs b/Core/Services/MatchLocationService.cs index bf53194c..a42861aa 100644 --- a/Core/Services/MatchLocationService.cs +++ b/Core/Services/MatchLocationService.cs @@ -1,5 +1,8 @@ -namespace Core.Services; +using Core.Annotations; +namespace Core.Services; + +[Injectable(InjectionType.Singleton)] public class MatchLocationService { public void DeleteGroup(object info) diff --git a/Core/Services/ModCompilerService.cs b/Core/Services/ModCompilerService.cs index ed90b969..2f05c262 100644 --- a/Core/Services/ModCompilerService.cs +++ b/Core/Services/ModCompilerService.cs @@ -1,5 +1,8 @@ -namespace Core.Services; +using Core.Annotations; +namespace Core.Services; + +[Injectable(InjectionType.Singleton)] public class ModCompilerService { /// diff --git a/Core/Services/NotificationService.cs b/Core/Services/NotificationService.cs index 526c78b8..2ba21dae 100644 --- a/Core/Services/NotificationService.cs +++ b/Core/Services/NotificationService.cs @@ -1,7 +1,9 @@ -using Core.Models.Eft.Ws; +using Core.Annotations; +using Core.Models.Eft.Ws; namespace Core.Services; +[Injectable(InjectionType.Singleton)] public class NotificationService { public Dictionary> GetMessageQueue() diff --git a/Core/Services/OpenZoneService.cs b/Core/Services/OpenZoneService.cs index 94fbd849..6a1873b2 100644 --- a/Core/Services/OpenZoneService.cs +++ b/Core/Services/OpenZoneService.cs @@ -1,5 +1,8 @@ -namespace Core.Services; +using Core.Annotations; +namespace Core.Services; + +[Injectable(InjectionType.Singleton)] public class OpenZoneService { /// diff --git a/Core/Services/PaymentService.cs b/Core/Services/PaymentService.cs index 6d3ab622..172f949d 100644 --- a/Core/Services/PaymentService.cs +++ b/Core/Services/PaymentService.cs @@ -1,9 +1,11 @@ -using Core.Models.Eft.Common; +using Core.Annotations; +using Core.Models.Eft.Common; using Core.Models.Eft.Common.Tables; using Core.Models.Eft.ItemEvent; namespace Core.Services; +[Injectable(InjectionType.Singleton)] public class PaymentService { /** diff --git a/Core/Services/PlayerService.cs b/Core/Services/PlayerService.cs index f1ae9f2d..ff955650 100644 --- a/Core/Services/PlayerService.cs +++ b/Core/Services/PlayerService.cs @@ -1,7 +1,9 @@ -using Core.Models.Eft.Common; +using Core.Annotations; +using Core.Models.Eft.Common; namespace Core.Services; +[Injectable(InjectionType.Singleton)] public class PlayerService { public int CalculateLevel(PmcData pmcData) diff --git a/Core/Services/PmcChatResponseService.cs b/Core/Services/PmcChatResponseService.cs index a6571bd4..cc439a10 100644 --- a/Core/Services/PmcChatResponseService.cs +++ b/Core/Services/PmcChatResponseService.cs @@ -1,9 +1,11 @@ -using Core.Models.Eft.Common; +using Core.Annotations; +using Core.Models.Eft.Common; using Core.Models.Eft.Common.Tables; using Core.Models.Eft.Profile; namespace Core.Services; +[Injectable(InjectionType.Singleton)] public class PmcChatResponseService { /** diff --git a/Core/Services/PostDbLoadService.cs b/Core/Services/PostDbLoadService.cs index eaf885c4..d19d5cda 100644 --- a/Core/Services/PostDbLoadService.cs +++ b/Core/Services/PostDbLoadService.cs @@ -1,5 +1,8 @@ -namespace Core.Services; +using Core.Annotations; +namespace Core.Services; + +[Injectable(InjectionType.Singleton)] public class PostDbLoadService { public void PerformPostDbLoadActions() diff --git a/Core/Services/ProfileActivityService.cs b/Core/Services/ProfileActivityService.cs index 163ef857..89364a7d 100644 --- a/Core/Services/ProfileActivityService.cs +++ b/Core/Services/ProfileActivityService.cs @@ -1,5 +1,8 @@ -namespace Core.Services; +using Core.Annotations; +namespace Core.Services; + +[Injectable(InjectionType.Singleton)] public class ProfileActivityService { /** diff --git a/Core/Services/ProfileFixerService.cs b/Core/Services/ProfileFixerService.cs index 5fa0ead3..917890a7 100644 --- a/Core/Services/ProfileFixerService.cs +++ b/Core/Services/ProfileFixerService.cs @@ -1,4 +1,5 @@ -using Core.Models.Eft.Common; +using Core.Annotations; +using Core.Models.Eft.Common; using Core.Models.Eft.Common.Tables; using Core.Models.Eft.Hideout; using Core.Models.Eft.Profile; @@ -6,6 +7,7 @@ using Core.Models.Enums; namespace Core.Services; +[Injectable(InjectionType.Singleton)] public class ProfileFixerService { /// diff --git a/Core/Services/RagfairCategoriesService.cs b/Core/Services/RagfairCategoriesService.cs index 87c25832..431755c7 100644 --- a/Core/Services/RagfairCategoriesService.cs +++ b/Core/Services/RagfairCategoriesService.cs @@ -1,7 +1,9 @@ -using Core.Models.Eft.Ragfair; +using Core.Annotations; +using Core.Models.Eft.Ragfair; namespace Core.Services; +[Injectable(InjectionType.Singleton)] public class RagfairCategoriesService { /// diff --git a/Core/Services/RagfairLinkedItemService.cs b/Core/Services/RagfairLinkedItemService.cs index a5f01e56..f83936d1 100644 --- a/Core/Services/RagfairLinkedItemService.cs +++ b/Core/Services/RagfairLinkedItemService.cs @@ -1,7 +1,9 @@ -using Core.Models.Eft.Common.Tables; +using Core.Annotations; +using Core.Models.Eft.Common.Tables; namespace Core.Services; +[Injectable(InjectionType.Singleton)] public class RagfairLinkedItemService { public HashSet GetLinkedItems(string linkedSearchId) diff --git a/Core/Services/RagfairOfferService.cs b/Core/Services/RagfairOfferService.cs index 98a8b835..b1a9f8cf 100644 --- a/Core/Services/RagfairOfferService.cs +++ b/Core/Services/RagfairOfferService.cs @@ -1,8 +1,10 @@ -using Core.Models.Eft.Common.Tables; +using Core.Annotations; +using Core.Models.Eft.Common.Tables; using Core.Models.Eft.Ragfair; namespace Core.Services; +[Injectable(InjectionType.Singleton)] public class RagfairOfferService { /// diff --git a/Core/Services/RagfairPriceService.cs b/Core/Services/RagfairPriceService.cs index b4a265ae..0a0fff03 100644 --- a/Core/Services/RagfairPriceService.cs +++ b/Core/Services/RagfairPriceService.cs @@ -1,9 +1,11 @@ -using Core.Models.Common; +using Core.Annotations; +using Core.Models.Common; using Core.Models.Eft.Common.Tables; using Core.Models.Spt.Config; namespace Core.Services; +[Injectable(InjectionType.Singleton)] public class RagfairPriceService { /// diff --git a/Core/Services/RagfairRequiredItemsService.cs b/Core/Services/RagfairRequiredItemsService.cs index c25921fc..485be6e9 100644 --- a/Core/Services/RagfairRequiredItemsService.cs +++ b/Core/Services/RagfairRequiredItemsService.cs @@ -1,7 +1,9 @@ -using Core.Models.Eft.Ragfair; +using Core.Annotations; +using Core.Models.Eft.Ragfair; namespace Core.Services; +[Injectable(InjectionType.Singleton)] public class RagfairRequiredItemsService { public List GetRequiredItemsById(string searchId) diff --git a/Core/Services/RagfairTaxService.cs b/Core/Services/RagfairTaxService.cs index aac05256..24a4c87d 100644 --- a/Core/Services/RagfairTaxService.cs +++ b/Core/Services/RagfairTaxService.cs @@ -1,7 +1,9 @@ -using Core.Models.Eft.Ragfair; +using Core.Annotations; +using Core.Models.Eft.Ragfair; namespace Core.Services; +[Injectable(InjectionType.Singleton)] public class RagfairTaxService { public void StoreClientOfferTaxValue(string sessionId, StorePlayerOfferTaxAmountRequestData offer) diff --git a/Core/Services/RaidTimeAdjustmentService.cs b/Core/Services/RaidTimeAdjustmentService.cs index 70ca8f5a..9b087357 100644 --- a/Core/Services/RaidTimeAdjustmentService.cs +++ b/Core/Services/RaidTimeAdjustmentService.cs @@ -1,10 +1,12 @@ -using Core.Models.Eft.Common; +using Core.Annotations; +using Core.Models.Eft.Common; using Core.Models.Eft.Game; using Core.Models.Spt.Config; using Core.Models.Spt.Location; namespace Core.Services; +[Injectable(InjectionType.Singleton)] public class RaidTimeAdjustmentService { /// diff --git a/Core/Services/RaidWeatherService.cs b/Core/Services/RaidWeatherService.cs index 2bdc5718..9e94e567 100644 --- a/Core/Services/RaidWeatherService.cs +++ b/Core/Services/RaidWeatherService.cs @@ -1,8 +1,10 @@ -using Core.Models.Eft.Weather; +using Core.Annotations; +using Core.Models.Eft.Weather; using Core.Models.Enums; namespace Core.Services; +[Injectable(InjectionType.Singleton)] public class RaidWeatherService { /// diff --git a/Core/Services/RepairService.cs b/Core/Services/RepairService.cs index eaa911ef..33783320 100644 --- a/Core/Services/RepairService.cs +++ b/Core/Services/RepairService.cs @@ -1,4 +1,5 @@ using System.Text.Json.Serialization; +using Core.Annotations; using Core.Models.Eft.Common; using Core.Models.Eft.Common.Tables; using Core.Models.Eft.ItemEvent; @@ -7,6 +8,7 @@ using Core.Models.Enums; namespace Core.Services; +[Injectable(InjectionType.Singleton)] public class RepairService { /// diff --git a/Core/Services/SeasonalEventService.cs b/Core/Services/SeasonalEventService.cs index 3212d720..43f1d1ce 100644 --- a/Core/Services/SeasonalEventService.cs +++ b/Core/Services/SeasonalEventService.cs @@ -1,10 +1,12 @@ -using Core.Models.Eft.Common; +using Core.Annotations; +using Core.Models.Eft.Common; using Core.Models.Eft.Common.Tables; using Core.Models.Enums; using Core.Models.Spt.Config; namespace Core.Services; +[Injectable(InjectionType.Singleton)] public class SeasonalEventService { /// diff --git a/Core/Services/TraderAssortService.cs b/Core/Services/TraderAssortService.cs index 3de93442..388dc842 100644 --- a/Core/Services/TraderAssortService.cs +++ b/Core/Services/TraderAssortService.cs @@ -1,7 +1,9 @@ -using Core.Models.Eft.Common.Tables; +using Core.Annotations; +using Core.Models.Eft.Common.Tables; namespace Core.Services; +[Injectable(InjectionType.Singleton)] public class TraderAssortService { public TraderAssort GetPristineTraderAssort(string traderId) diff --git a/Core/Services/TraderPurchasePersisterService.cs b/Core/Services/TraderPurchasePersisterService.cs index 4fa8db96..8c6cbd26 100644 --- a/Core/Services/TraderPurchasePersisterService.cs +++ b/Core/Services/TraderPurchasePersisterService.cs @@ -1,7 +1,9 @@ -using Core.Models.Eft.Profile; +using Core.Annotations; +using Core.Models.Eft.Profile; namespace Core.Services; +[Injectable(InjectionType.Singleton)] public class TraderPurchasePersisterService { /** diff --git a/Server/user/profiles/6781aa7c00037bbc69469ef8.json b/Server/user/profiles/6781aa7c00037bbc69469ef8.json new file mode 100644 index 00000000..e69de29b