コード例 #1
0
        public CQRSService(
            IGamePlayEngine gamePlayEngine,
            IGamePlayListener gamePlayListener,
            IReadCacheDataRepository readCacheDataRepository,
            IGameDataRepository gameDataRepository,
            ICqrsLogicHandler logicHandler,
            IEventPublisher eventPublisher,
            IComponentContext componentContext,
            ILogFactory logFactory
            ) : base(componentContext, logFactory)
        {
            _gamePlayEngine          = gamePlayEngine;
            _gamePlayListener        = gamePlayListener;
            _readCacheDataRepository = readCacheDataRepository;
            _gameDataRepository      = gameDataRepository;

            _logicHandler = logicHandler;

            _handlers.AddRange(
                componentContext.ResolveAll <IHttpRequestHandler>()
                );

            _log = logFactory.CreateForType(this);

            // Subscribe myself to any event
            eventPublisher.Attach(this);
        }
コード例 #2
0
        public AbstractService(
            IComponentContext componentContext,
            ILogFactory logFactory
            )
        {
            _logicHandler        = componentContext.Resolve <ICqrsLogicHandler>();
            _eventPublisher      = componentContext.Resolve <IEventPublisher>();
            _localTcpPortManager = componentContext.Resolve <ILocalTcpPortManager>();
            _appSettings         = componentContext.Resolve <IAppSettings>();

            _log = logFactory.CreateForType(this);
        }
コード例 #3
0
        public RESTFulService(
            IRESTFulGameEngineListener gameEngineListener,
            IGamePlayEngine gamePlayEngine,
            ICqrsLogicHandler logicHandler,
            IComponentContext componentContext,
            ILogFactory logFactory
            ) : base(componentContext, logFactory)
        {
            _gameEngineListener = gameEngineListener;
            _gamePlayEngine     = gamePlayEngine;

            _logicHandler = logicHandler;

            _log = logFactory.CreateForType(this);
        }
コード例 #4
0
        public ConsoleService(
            IGamePlayEngine gamePlayEngine,
            IGamePlayListener gamePlayListener,
            IReadCacheDataRepository readCacheDataRepository,
            IGameDataRepository gameDataRepository,
            ICqrsLogicHandler logicHandler,
            IComponentContext componentContext,
            ILogFactory logFactory
            ) : base(componentContext, logFactory)
        {
            _gamePlayEngine          = gamePlayEngine;
            _gamePlayListener        = gamePlayListener;
            _readCacheDataRepository = readCacheDataRepository;
            _gameDataRepository      = gameDataRepository;

            _logicHandler = logicHandler;

            _log = logFactory.CreateForType(this);
        }