Exemplo n.º 1
0
        private static ConcreteComponentAssembler GetAssembler(Game game, ComponentAssembler assembler)
        {
            var tokenReplacer     = new TokenReplacer(new ApplicationFilePathTokenReplacingPolicy(() => game.FilePath));
            var assemblingContext = new AssemblingContext(FormType.New, tokenReplacer);

            return(new ConcreteComponentAssembler(assembler, assemblingContext));
        }
Exemplo n.º 2
0
        public PluginFactory(ComponentAssembler assembler)
        {
            _gameProfileFactory = new Dictionary <PluginType, Func <GamePackage, IPluginDataAccessLayer> >
            {
                [PluginType.Direct3D11] = package => new Direct3D11PluginDataAccessLayer(
                    package.GameProfile.Direct3D11Settings,
                    GetAssembler(package.Game, assembler))
            };

            _proxyPluginSettingsFactory = new Dictionary <PluginType, Func <ProxyPluginSettings, IPluginDataAccessLayer> >
            {
                [PluginType.Direct3D11] = settings => new Direct3D11PluginDataAccessLayer(
                    settings.Direct3D11Settings,
                    new ConcreteComponentAssembler(assembler, new AssemblingContext(FormType.Edit)))
            };
        }
Exemplo n.º 3
0
 public GameSettingsProcessWatcher(
     Plugins plugins,
     string communicationAddress,
     ushort communicationPort,
     ComponentAssembler assembler,
     IDirectoryRepository directoryRepository,
     IGameRepository gameRepository,
     IInjectionService injectionService,
     ILogger logger,
     IProcessWatcher processWatcher)
 {
     _plugins = plugins;
     _communicationAddress = communicationAddress;
     _communicationPort    = communicationPort;
     _assembler            = assembler;
     _directoryRepository  = directoryRepository;
     _injectionService     = injectionService;
     _gameRepository       = gameRepository;
     _logger         = logger;
     _processWatcher = processWatcher;
 }
Exemplo n.º 4
0
 public GameSettingsWatchableProcess(
     AggregateId gameId,
     Plugins plugins,
     string communicationAddress,
     ushort communicationPort,
     ComponentAssembler assembler,
     IDirectoryRepository directoryRepository,
     IGameRepository gamesRepository,
     IInjectionService injectionService,
     ILogger logger)
 {
     GameId   = gameId;
     _plugins = plugins;
     _communicationAddress = communicationAddress;
     _communicationPort    = communicationPort;
     _assembler            = assembler;
     _directoryRepository  = directoryRepository;
     _gameRepository       = gamesRepository;
     _injectionService     = injectionService;
     _logger = logger;
 }
Exemplo n.º 5
0
 public ConcreteComponentAssembler(ComponentAssembler assembler, AssemblingContext assemblingContext)
 {
     _assembler         = assembler;
     _assemblingContext = assemblingContext;
 }