@@ -1,60 +1,33 @@
using MareSynchronos.FileCache ;
using MareSynchronos.Interop.Ipc ;
using MareSynchronos.API.Data ;
using MareSynchronos.API.Dto.Group ;
using MareSynchronos.MareConfiguration ;
using MareSynchronos.PlayerData.Handlers ;
using MareSynchronos.PlayerData.Pairs ;
using MareSynchronos.Services ;
using MareSynchronos.Services.Mediator ;
using MareSynchronos.Services.ServerConfiguration ;
using Microsoft.Extensions.Hosting ;
using Microsoft.Extensions.Logging ;
namespace MareSynchronos.PlayerData.Factories ;
public class PairHandler Factory
public class PairFactory
{
private readonly MareConfigService _configService ;
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 PairHandlerFactory _cachedPlayerFactory ;
private readonly ILoggerFactory _loggerFactory ;
private readonly MareMediator _mareMediator ;
private readonly PlayerPerformanceService _playerPerformanceService ;
private readonly ServerConfigurationManager _serverConfigManager ;
private readonly PluginWarningNotificationService _pluginWarningNotificationManager ;
private readonly PairAnalyzerFactory _pairAnalyzerFactory ;
private readonly VisibilityService _visibilityService ;
private readonly MareConfigService _mareConfig ;
private readonly ServerConfigurationManager _serverConfiguration Manager ;
public PairHandler Factory ( ILoggerFactory loggerFactory , GameObject HandlerFactory gameObjectHandlerFactory , IpcManager ipcManager ,
FileDownloadManagerFac tory fileDownloadManagerFac tory , DalamudUtilService dalamudUtilService ,
PluginWarningNotificationService pluginWarningNotificationManager , IHostApplicationLifetime hostApplicationLifetime ,
FileCacheManager fileCacheManager , MareMediator mareMediator , PlayerPerformanceService playerPerformanceService ,
ServerConfigurationManager serverConfigManager , PairAnalyzerFactory pairAnalyzerFactory ,
MareConfigService configService , VisibilityService visibilityService )
public PairFactory ( ILoggerFactory loggerFactory , Pair HandlerFactory cachedPlayerFactory ,
MareMedia tor mareMedia tor, MareConfigService mareConfig , ServerConfigurationManager serverConfigurationManager )
{
_loggerFactory = loggerFactory ;
_gameObjectHandl erFactory = gameObjectHandl erFactory;
_ipcManager = ipcManager ;
_fileDownloadManagerFactory = fileDownloadManagerFactory ;
_dalamudUtilService = dalamudUtilService ;
_pluginWarningNotificationManager = pluginWarningNotificationManager ;
_hostApplicationLifetime = hostApplicationLifetime ;
_fileCacheManager = fileCacheManager ;
_cachedPlay erFactory = cachedPlay erFactory;
_mareMediator = mareMediator ;
_playerPerformanceService = playerPerformanceService ;
_serverConfigManager = serverConfigManager ;
_pairAnalyzerFactory = pairAnalyzerFactory ;
_configService = configService ;
_visibilityService = visibilityService ;
_mareConfig = mareConfig ;
_serverConfiguration Manager = serverConfiguration Manager ;
}
public PairHandler Create ( Pair pair )
public Pair Create ( UserData userData )
{
return new PairHandler ( _loggerFactory . CreateLogger < PairHandler > ( ) , pair , _pairAnalyzerFactory . Create ( pair ) , _gameObjectHandlerFactory ,
_ipcManager , _fileDownloadManagerFactory . Create ( ) , _pluginWarningNotificationManager , _dalamudUtilService , _hostApplicationLifetime ,
_fileCacheManager , _mareMediator , _playerPerformanceService , _serverConfigManager , _configService , _visibilityService ) ;
return new Pair ( _loggerFactory . CreateLogger < Pair > ( ) , userData , _cachedPlayerFactory , _mareMediator , _mareConfig , _serverConfigurationManager ) ;
}
}