using LightlessSync.FileCache; using LightlessSync.Interop.Ipc; using LightlessSync.PlayerData.Handlers; using LightlessSync.PlayerData.Pairs; using LightlessSync.Services; using LightlessSync.Services.Mediator; using LightlessSync.Services.ServerConfiguration; using Microsoft.Extensions.Hosting; using Microsoft.Extensions.Logging; namespace LightlessSync.PlayerData.Factories; public class PairHandlerFactory { private readonly DalamudUtilService _dalamudUtilService; private readonly FileCacheManager _fileCacheManager; private readonly FileDownloadManagerFactory _fileDownloadManagerFactory; private readonly GameObjectHandlerFactory _gameObjectHandlerFactory; private readonly IHostApplicationLifetime _hostApplicationLifetime; private readonly IpcManager _ipcManager; private readonly ILoggerFactory _loggerFactory; private readonly LightlessMediator _lightlessMediator; private readonly PlayerPerformanceService _playerPerformanceService; private readonly PairProcessingLimiter _pairProcessingLimiter; private readonly ServerConfigurationManager _serverConfigManager; private readonly PluginWarningNotificationService _pluginWarningNotificationManager; public PairHandlerFactory(ILoggerFactory loggerFactory, GameObjectHandlerFactory gameObjectHandlerFactory, IpcManager ipcManager, FileDownloadManagerFactory fileDownloadManagerFactory, DalamudUtilService dalamudUtilService, PluginWarningNotificationService pluginWarningNotificationManager, IHostApplicationLifetime hostApplicationLifetime, FileCacheManager fileCacheManager, LightlessMediator lightlessMediator, PlayerPerformanceService playerPerformanceService, PairProcessingLimiter pairProcessingLimiter, ServerConfigurationManager serverConfigManager) { _loggerFactory = loggerFactory; _gameObjectHandlerFactory = gameObjectHandlerFactory; _ipcManager = ipcManager; _fileDownloadManagerFactory = fileDownloadManagerFactory; _dalamudUtilService = dalamudUtilService; _pluginWarningNotificationManager = pluginWarningNotificationManager; _hostApplicationLifetime = hostApplicationLifetime; _fileCacheManager = fileCacheManager; _lightlessMediator = lightlessMediator; _playerPerformanceService = playerPerformanceService; _pairProcessingLimiter = pairProcessingLimiter; _serverConfigManager = serverConfigManager; } public PairHandler Create(Pair pair) { return new PairHandler(_loggerFactory.CreateLogger(), pair, _gameObjectHandlerFactory, _ipcManager, _fileDownloadManagerFactory.Create(), _pluginWarningNotificationManager, _dalamudUtilService, _hostApplicationLifetime, _fileCacheManager, _lightlessMediator, _playerPerformanceService, _pairProcessingLimiter, _serverConfigManager); } }