Beispiel #1
0
        public GameDataPersister(IGameDataStoreDataAccessService gameDataStoreDataAccessService
                                 , IMapperFactory mapperFactory)
        {
            _gameDataStoreDataAccessService = gameDataStoreDataAccessService;

            _mapperFactory            = mapperFactory;
            _gameDataPersistMapper    = _mapperFactory.Build <IGame, StoredGameData>("StoreGameDataMapper");
            _fundsDriverPersistMapper = _mapperFactory.Build <Item, StoredItem>();
        }
 public UserRepository(IUnitOfWorkFactory unitOfWorkFactory
                       , IMapperFactory mapperFactory
                       )
 {
     _unitOfWorkFactory  = unitOfWorkFactory;
     _mapperFactory      = mapperFactory;
     _userEntityMapper   = _mapperFactory.Build <User, UserEntity>();
     _userContractMapper = _mapperFactory.Build <UserEntity, User>();
 }
        public GameDataChangesNotifier(
            IGameDataStoreDataAccessService gameDataStoreDataAccessService
            , IMapperFactory mapperFactory
            , INotifyConsumerClientFactory notifyConsumerService)
        {
            _mapperFactory            = mapperFactory;
            _gameDataRefreshMapper    = _mapperFactory.Build <IGame, GameData>("GameDataMapper");
            _fundsDriverRefreshMapper = _mapperFactory.Build <Item, Common.Contract.Items.Item>();

            _notifyConsumerService = notifyConsumerService;
        }
        public GameManager(ILogger logger, IOperationContextHelper operationContextHelper, GameSessions gameSessions
                           , IMapperFactory mapperFactory
                           )
        {
            _logger = logger;
            _operationContextHelper = operationContextHelper;
            _gameSessions           = gameSessions;

            _mapperFactory = mapperFactory;

            _gameDataContractMapper    = _mapperFactory.Build <IGame, GameData>();
            _countersContractMapper    = _mapperFactory.Build <GameCash, Cash>();
            _fundsDriverContractMapper = _mapperFactory.Build <Item, Common.Contract.Items.Item>();
            _manualStepResultMapper    = _mapperFactory.Build <ManualStepResult, Contract.GameManager.ManualStepResult>();
        }
Beispiel #5
0
 public CountersRepository(IUnitOfWorkFactory unitOfWorkFactory
                           , IMapperFactory mapperFactory
                           )
 {
     _unitOfWorkFactory     = unitOfWorkFactory;
     _mapperFactory         = mapperFactory;
     _counterContractMapper = _mapperFactory.Build <CounterEntity, CounterBase>();
 }
Beispiel #6
0
 public CustomRuleRepository(IUnitOfWorkFactory unitOfWorkFactory
                             , IMapperFactory mapperFactory
                             )
 {
     _unitOfWorkFactory = unitOfWorkFactory;
     _mapperFactory     = mapperFactory;
     _customRuleMapper  = _mapperFactory.Build <CustomRuleEntity, CustomRule>();
 }
Beispiel #7
0
        public ServerStatisticsInfoModel GetStatistics()
        {
            var statistics = _mapperFactory.Build <StatisticsInfo, ServerStatisticsInfoModel>().Map(_adminManager.GetStatisticsInfo());

            statistics.ActiveWorkers =
                _workerManager.GetWorkersStatus().Where(_ => _.IsRunning).Select(_ => _.Name).ToArray();
            return(statistics);
        }
Beispiel #8
0
 public ItemRepository(IUnitOfWorkFactory unitOfWorkFactory
                       , IMapperFactory mapperFactory
                       )
 {
     _unitOfWorkFactory         = unitOfWorkFactory;
     _mapperFactory             = mapperFactory;
     _fundsDriverContractMapper = _mapperFactory.Build <FundsDriverEntity, Item>();
 }
        public NotifyGameDataChanged(string userId
                                     , string userName
                                     , IGameDataStoreDataAccessService gameDataStoreDataAccessService
                                     , IMapperFactory mapperFactory
                                     , INotifyConsumerClientFactory notifyConsumerService)
        {
            _userId   = userId;
            _userName = userName;
            _gameDataStoreDataAccessService = gameDataStoreDataAccessService;

            _mapperFactory = mapperFactory;

            _gameDataPersistMapper    = _mapperFactory.Build <IGame, StoredGameData>("StoreGameDataMapper");
            _gameDataRefreshMapper    = _mapperFactory.Build <IGame, GameData>("GameDataMapper");
            _fundsDriverPersistMapper = _mapperFactory.Build <Item, StoredItem>();
            _fundsDriverRefreshMapper = _mapperFactory.Build <Item, Common.Contract.Items.Item>();
            _notifyConsumerService    = notifyConsumerService;
        }
Beispiel #10
0
        public GameDataProvider(
            ILogger logger,
            IGameClientFactory gameClientFactory,
            ISimpleUserManager simpleUserManager,
            ISessionManagerClientFactory sessionManagerClient,
            IMapperFactory mapperFactory
            )
        {
            _logger               = logger;
            _simpleUserManager    = simpleUserManager;
            _sessionManagerClient = sessionManagerClient;

            _mapperFactory = mapperFactory;

            _gameDataModelMapper           = _mapperFactory.Build <GameData, GameDataModel>();
            _fundsCounterModelMapper       = _mapperFactory.Build <Cash, CashModel>();
            _fundsDriverBuyinfoModelMapper = _mapperFactory.Build <BuyFundDriverResult, BuyItemModel>();
            _gameClientFactory             = gameClientFactory;
        }
 public RatingControllerBase(IRatingManager raitingManager, IMapperFactory mapperFactory)
 {
     _raitingManager            = raitingManager;
     _topRatingStatisticsMapper = mapperFactory.Build <TopRatingStatistics, TopRatingStatisticsModel>();
 }
 public GlobalRatingRepository(IMongoDatabase database, IMapperFactory mapperFactory)
 {
     Database = database;
     _topRatingStatisticsMapper = mapperFactory.Build <TopRatingStatistics, List <TopRatingStatisticsDocument> >();
 }