public TaskRunner(IServiceProvider svp)
        {
            _svp            = svp;
            _uTaskService   = _svp.GetService <IUTaskService>();
            _uReportService = _svp.GetService <IUReportService>();

            _gDetailPlanetService = _svp.GetService <IGDetailPlanetService>();
            _gameUserService      = _svp.GetService <IGameUserService>();
            _storeService         = _svp.GetService <IStoreService>();
            _allianceService      = _svp.GetService <IAllianceService>();
            _motherRunner         = _svp.GetService <IMotherRunner>();
            _confederationService = _svp.GetService <IConfederationService>();
            _mothershipService    = _svp.GetService <IMothershipService>();
            _motherJumpService    = _svp.GetService <IUMotherJumpService>();
            _planetRunner         = _svp.GetService <IPlanetRunner>();
            _demonLog             = _svp.GetService <IDemonAzureLogItem>();
            _dbProvider           = _svp.GetService <IDbProvider>();
        }
示例#2
0
        /// <summary>
        ///     Предварительные данные должны быть синхронизированны
        /// </summary>
        /// <param name="connection"></param>
        /// <param name="mother"></param>
        /// <param name="allianceTech"></param>
        /// <param name="confederationService"></param>
        /// <param name="storeService"></param>
        /// <returns></returns>
        public static Dictionary <UnitType, Dictionary <BattleStatTypes, IBattleStatsDouble> > GetUnitStatsAndMods(IDbConnection connection, UserMothershipDataModel mother, AllianceTechDataModel allianceTech, IConfederationService confederationService, IStoreService storeService)
        {
            var boosersMods           = GetBoosterBonuses(connection, mother.Id, storeService);
            var officerBonus          = confederationService.GetOfficerBonus(connection, allianceTech.Id);
            var userTechesService     = new BattleTeches(mother.TechProgress);
            var allianceTechesService = new BattleTeches(allianceTech.Teches);

            return(GetUnitStatsAndMods(mother.Id, userTechesService, allianceTechesService, officerBonus, boosersMods));
        }
 public VoteController(IConfederationService confederationService, IGameDataContextProvider provider, IGameDataContextProvider db) : base(db, false)
 {
     _provider             = provider;
     _hub                  = GlobalHost.ConnectionManager.GetHubContext <MainGameHub>();
     _confederationService = (ConfederationService)confederationService;
 }
示例#4
0
        public MainGameHub(IServiceProvider svp)
        {
            #region Main

            _svp      = svp;
            _hubCache = _svp.GetService <IMainGameHubLocalStorageCache>();

            #endregion

            #region Main User

            _gameUserService = _svp.GetService <IGameUserService>();
            _allianceService = _svp.GetService <IAllianceService>();
            _channelService  = (ChannelService)_svp.GetService <IChannelService>();

            _mothershipService = _svp.GetService <IMothershipService>();
            _motherJumpService = _svp.GetService <IUMotherJumpService>();
            _storeService      = _svp.GetService <IStoreService>();

            #endregion

            #region World

            _gameTypeService        = _svp.GetService <IGameTypeService>();
            _gGeometryPlanetService = _svp.GetService <IGGeometryPlanetService>();
            _gDetailPlanetService   = _svp.GetService <IGDetailPlanetService>();
            _gSectorsService        = _svp.GetService <IGSectorsService>();
            _mapInfoService         = _svp.GetService <IMapInfoService>();
            _systemService          = _svp.GetService <ISystemService>();
            _worldService           = _svp.GetService <IWorldService>();
            _gUserBookmarkService   = (GUserBookmarkService)_svp.GetService <IGUserBookmarkService>();

            #endregion

            #region builds

            //collections
            _commandCenter     = _svp.GetService <ICommandCenter>();
            _industrialComplex = _svp.GetService <IIndustrialComplex>();
            _laboratory        = _svp.GetService <ILaboratory>();
            _shipyard          = _svp.GetService <IShipyard>();


            //items
            _energyConverter  = _svp.GetService <IEnergyConverter>();
            _extractionModule = _svp.GetService <IExtractionModule>();
            _extractionModule = _svp.GetService <IExtractionModule>();
            _spaceShipyard    = _svp.GetService <ISpaceShipyard>();
            _storage          = _svp.GetService <IStorage>();
            _turels           = _svp.GetService <ITurels>();

            //common
            _unit                    = _svp.GetService <IUnit>();
            _storageResources        = _svp.GetService <IStorageResourcesService>();
            _transferResourceService = _svp.GetService <ITransferResourceService>();

            #endregion

            #region Global User

            _estateOwnService  = _svp.GetService <IEstateOwnService>();
            _synchronizer      = _svp.GetService <ISynchronizer>();
            _estateListService = _svp.GetService <IEstateListService>();
            _journalOutService = _svp.GetService <IJournalOutService>();
            _gameRunner        = _svp.GetService <IGameRunner>();
            _dbProvider        = _svp.GetService <IDbProvider>();

            #endregion

            #region Confederation

            _confederationService = _svp.GetService <IConfederationService>();

            #endregion
        }
示例#5
0
 public ConfederationController(IConfederationService confederationService, IMapper mapper)
 {
     this._confederationService = confederationService;
     this._mapper = mapper;
 }