Пример #1
0
        public GameDataPersister(IGameDataStoreDataAccessService gameDataStoreDataAccessService
                                 , IMapperFactory mapperFactory)
        {
            _gameDataStoreDataAccessService = gameDataStoreDataAccessService;

            _mapperFactory            = mapperFactory;
            _gameDataPersistMapper    = _mapperFactory.Build <IGame, StoredGameData>("StoreGameDataMapper");
            _fundsDriverPersistMapper = _mapperFactory.Build <Item, StoredItem>();
        }
Пример #2
0
 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;
        }
Пример #4
0
        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>();
        }
Пример #5
0
 public CountersRepository(IUnitOfWorkFactory unitOfWorkFactory
                           , IMapperFactory mapperFactory
                           )
 {
     _unitOfWorkFactory     = unitOfWorkFactory;
     _mapperFactory         = mapperFactory;
     _counterContractMapper = _mapperFactory.Build <CounterEntity, CounterBase>();
 }
Пример #6
0
 public CustomRuleRepository(IUnitOfWorkFactory unitOfWorkFactory
                             , IMapperFactory mapperFactory
                             )
 {
     _unitOfWorkFactory = unitOfWorkFactory;
     _mapperFactory     = mapperFactory;
     _customRuleMapper  = _mapperFactory.Build <CustomRuleEntity, CustomRule>();
 }
Пример #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);
        }
Пример #8
0
 public ItemRepository(IUnitOfWorkFactory unitOfWorkFactory
                       , IMapperFactory mapperFactory
                       )
 {
     _unitOfWorkFactory         = unitOfWorkFactory;
     _mapperFactory             = mapperFactory;
     _fundsDriverContractMapper = _mapperFactory.Build <FundsDriverEntity, Item>();
 }
Пример #9
0
        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;
        }
Пример #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;
        }
Пример #11
0
 public RatingControllerBase(IRatingManager raitingManager, IMapperFactory mapperFactory)
 {
     _raitingManager            = raitingManager;
     _topRatingStatisticsMapper = mapperFactory.Build <TopRatingStatistics, TopRatingStatisticsModel>();
 }
Пример #12
0
 public GlobalRatingRepository(IMongoDatabase database, IMapperFactory mapperFactory)
 {
     Database = database;
     _topRatingStatisticsMapper = mapperFactory.Build <TopRatingStatistics, List <TopRatingStatisticsDocument> >();
 }