using SharedLibraryCore; using SharedLibraryCore.Configuration; using SharedLibraryCore.Interfaces; using System.Collections; namespace IW4MAdmin.Application.Factories { /// /// implementation of IGameServerInstanceFactory /// internal class GameServerInstanceFactory : IGameServerInstanceFactory { private readonly ITranslationLookup _translationLookup; private readonly IRConConnectionFactory _rconConnectionFactory; private readonly IGameLogReaderFactory _gameLogReaderFactory; private readonly IMetaService _metaService; /// /// base constructor /// /// /// public GameServerInstanceFactory(ITranslationLookup translationLookup, IRConConnectionFactory rconConnectionFactory, IGameLogReaderFactory gameLogReaderFactory, IMetaService metaService) { _translationLookup = translationLookup; _rconConnectionFactory = rconConnectionFactory; _gameLogReaderFactory = gameLogReaderFactory; _metaService = metaService; } /// /// creates an IW4MServer instance /// /// server configuration /// application manager /// public Server CreateServer(ServerConfiguration config, IManager manager) { return new IW4MServer(manager, config, _translationLookup, _rconConnectionFactory, _gameLogReaderFactory, _metaService); } } }