예제 #1
0
        public IdleHeroesSchema(Func <Type, GraphType> resolveType, IUpgradeService upgradeService)
            : base(resolveType)
        {
            Query = (IdleHeroesQuery)resolveType(typeof(IdleHeroesQuery));

            RegisterTypes(new FactionGraphType(), new RoleGraphType(), new HeroDataGraphType(), new HeroGraphType(upgradeService), new FactionDetailsGraphType(), new RoleDetailsGraphType());
        }
예제 #2
0
        /// <summary>
        /// Get latest version of client.
        /// </summary>
        /// <param name="serverIP">server ip</param>
        /// <param name="serverPort">server port</param>
        public static int GetLatestVersion(string serverIP, int serverPort)
        {
            IUpgradeService upgradeService = (IUpgradeService)Activator.GetObject(typeof(IUpgradeService),
                                                                                  string.Format("tcp://{0}:{1}/UpgradeCenter", serverIP, serverPort + 2));

            return(upgradeService.GetLatestVersion());
        }
 public ContentPickerController(
     IUpgradeService upgradeService,
     IOrchardServices orchardServices,
     IFeatureManager featureManager) {
     _upgradeService = upgradeService;
     _orchardServices = orchardServices;
     _featureManager = featureManager;
 }
예제 #4
0
 public MessagingController(
     IUpgradeService upgradeService,
     IOrchardServices orchardServices,
     IRepository<ActivityRecord> repository) {
     _upgradeService = upgradeService;
     _orchardServices = orchardServices;
     _repository = repository;
 }
예제 #5
0
 public TaxonomyController(
     IUpgradeService upgradeService,
     IOrchardServices orchardServices,
     IFeatureManager featureManager) {
     _upgradeService = upgradeService;
     _orchardServices = orchardServices;
     _featureManager = featureManager;
 }
예제 #6
0
 public MessagingController(
     IUpgradeService upgradeService,
     IOrchardServices orchardServices,
     IRepository <ActivityRecord> repository)
 {
     _upgradeService  = upgradeService;
     _orchardServices = orchardServices;
     _repository      = repository;
 }
 public TaxonomyController(
     IUpgradeService upgradeService,
     IOrchardServices orchardServices,
     IFeatureManager featureManager)
 {
     _upgradeService  = upgradeService;
     _orchardServices = orchardServices;
     _featureManager  = featureManager;
 }
예제 #8
0
 public ContentPickerController(
     IUpgradeService upgradeService,
     IOrchardServices orchardServices,
     IFeatureManager featureManager)
 {
     _upgradeService  = upgradeService;
     _orchardServices = orchardServices;
     _featureManager  = featureManager;
 }
예제 #9
0
 public IndexModel(IDataService dataService,
                   SignInManager <RemotelyUser> signInManager,
                   IUpgradeService upgradeService,
                   IApplicationConfig appConfig)
 {
     _dataService    = dataService;
     _signInManager  = signInManager;
     _appConfig      = appConfig;
     _upgradeService = upgradeService;
 }
예제 #10
0
    private new void Awake()
    {
        base.Awake();

        Material        = GetComponentInChildren <Renderer>().material;
        _seeker         = GetComponent <Seeker>();
        _levelData      = GameManager.Instance.LevelData;
        _gameState      = GameManager.Instance.Game;
        _upgradeService = GameManager.Instance.UpgradeService;
    }
예제 #11
0
 public UpdateCheckController(
     IUpgradeService upgradeService,
     IUmbracoVersion umbracoVersion,
     ICookieManager cookieManager,
     IBackOfficeSecurityAccessor backofficeSecurityAccessor,
     IOptionsSnapshot <GlobalSettings> globalSettings)
 {
     _upgradeService             = upgradeService ?? throw new ArgumentNullException(nameof(upgradeService));
     _umbracoVersion             = umbracoVersion ?? throw new ArgumentNullException(nameof(umbracoVersion));
     _cookieManager              = cookieManager ?? throw new ArgumentNullException(nameof(cookieManager));
     _backofficeSecurityAccessor = backofficeSecurityAccessor ?? throw new ArgumentNullException(nameof(backofficeSecurityAccessor));
     _globalSettings             = globalSettings.Value ?? throw new ArgumentNullException(nameof(globalSettings));
 }
예제 #12
0
        public InfosetController(
            IOrchardServices orchardServices,
            IUpgradeService upgradeService,
            IRepository<ContentItemRecord> contentItemRecord,
            IRepository<ContentItemVersionRecord> contentItemVersionRecord,
            ISignals signals) {
            _orchardServices = orchardServices;
            _upgradeService = upgradeService;
            _signals = signals;
            _contentItemVersionRecord = contentItemVersionRecord;
            _contentItemRecord = contentItemRecord;

            Logger = NullLogger.Instance;
        }
예제 #13
0
        public DataManager(
            ILogger logger,
            IEncryptionProvider encryptionProvider,
            ISerializationProvider serializationProvider,
            IRemoteSynchronizationService remoteSynchronizationService,
            IUpgradeService migrationService)
        {
            _logger                       = Arguments.NotNull(logger, nameof(logger));
            _encryptionProvider           = Arguments.NotNull(encryptionProvider, nameof(encryptionProvider));
            _serializationProvider        = Arguments.NotNull(serializationProvider, nameof(serializationProvider));
            _remoteSynchronizationService = Arguments.NotNull(remoteSynchronizationService, nameof(remoteSynchronizationService));
            _upgradeService               = Arguments.NotNull(migrationService, nameof(migrationService));

            _remoteSynchronizationService.SynchronizationCompleted += RemoteSynchronizationService_SynchronizationCompleted;
        }
예제 #14
0
        public InfosetController(
            IOrchardServices orchardServices,
            IUpgradeService upgradeService,
            IRepository <ContentItemRecord> contentItemRecord,
            IRepository <ContentItemVersionRecord> contentItemVersionRecord,
            ISignals signals)
        {
            _orchardServices          = orchardServices;
            _upgradeService           = upgradeService;
            _signals                  = signals;
            _contentItemVersionRecord = contentItemVersionRecord;
            _contentItemRecord        = contentItemRecord;

            Logger = NullLogger.Instance;
        }
예제 #15
0
        /// <summary>
        /// 由Updater升级前调用,尝试创建升级服务对象,如果不能从启动程序中获取到启动配置参数则创建失败。
        /// </summary>
        /// <param name="upgradeService"></param>
        /// <returns>是否成功创建了升级服务</returns>
        public static bool TryResolveUpgradeService(out IUpgradeService upgradeService)
        {
            upgradeService = null;
            var runArgs = Environment.GetCommandLineArgs().ToList();

            runArgs.RemoveAt(0);
            if (runArgs.Count == 0)
            {
                return(false);
            }
            try
            {
                byte[] argData = Convert.FromBase64String(runArgs[0]);
                _upgradeCmdArg = XmlSerializer.ToObject <UpgradeCmdArg>(argData);
                upgradeService = new UpgradeService(_upgradeCmdArg.Config);
                return(true);
            }
            catch (Exception exc)
            {
                return(false);
            }
        }
예제 #16
0
        private void Setup()
        {
            itemList.Setup(itemPrefab, layout, (data, view) => view.Setup(data), (data1, data2) => data1.Id == data2.Id,
                           (data1, data2) => {
                IUpgradeService serv  = Services.UpgradeService;
                bool isAllowBuyFirst  = serv.IsAllowBuy(data1);
                bool isAllowBuySecond = serv.IsAllowBuy(data2);

                if (isAllowBuyFirst && !isAllowBuySecond)
                {
                    return(-1);
                }
                if (!isAllowBuyFirst && isAllowBuySecond)
                {
                    return(1);
                }
                return(data1.Price(() => {
                    return BosUtils.GetUpgradePriceMult(Planets.CurrentPlanet.Data, data1);
                }).CompareTo(data2.Price(() => {
                    return BosUtils.GetUpgradePriceMult(Planets.CurrentPlanet.Data, data2);
                })));
            });
            itemList.UpdateViews(DataSource);
        }
예제 #17
0
 public UpdateCheckController(IUpgradeService upgradeService)
 {
     _upgradeService = upgradeService;
 }
예제 #18
0
 private void ConfigureServices()
 {
     _levelService   = new JsonLevelService(_configuration.LevelFolder);
     _upgradeService = new UpgradeService(_configuration.UpgradeCharacterValue);
     _saveService    = new BinarySaveService(_configuration.SaveGameDataFilename);
 }
예제 #19
0
 public UpgradeController(IUpgradeService upgradeService)
 {
     this._upgradeService = upgradeService;
 }
예제 #20
0
        public HeroGraphType(IUpgradeService upgradeCostService)
        {
            Name = "Hero";

            Description = "An instance of a hero with a specified number of stars and upgrade costs.";

            Field(x => x.Name).Description("The name of the hero.");

            Field(x => x.Stars).Description("The number of stars for the current hero.");

            Field(x => x.FactionId).Description("Internal Id for hero faction.");

            Field(x => x.RoleId).Description("Internal Id for hero faction.");

            Field(x => x.Faction, type: typeof(FactionGraphType)).Description("The hero's faction.");

            Field(x => x.Role, type: typeof(RoleGraphType)).Description("The hero's role.");

            Field <BooleanGraphType>(
                "isFusion",
                "Returns true if the current level is evolved to in the creation circle.",
                resolve: context => upgradeCostService.GetCosts(context.Source)?.IsFusion
                );

            Field <IntGraphType>(
                "minSpirit",
                "The minimum amount of spirit to spend going to star's min level this from previous star min level (ex: from 6 to 7).",
                resolve: context => upgradeCostService.GetCosts(context.Source)?.MinSpirit
                );

            Field <IntGraphType>(
                "maxSpirit",
                "The full amount of spirit to spend going to star's max level from the previous star's max level.",
                resolve: context => upgradeCostService.GetCosts(context.Source)?.MaxSpirit
                );

            Field <IntGraphType>(
                "minGold",
                "The minimum amount of gold to spend going to star's min level this from previous star min level (ex: from 6 to 7).",
                resolve: context => upgradeCostService.GetCosts(context.Source)?.MinGold
                );

            Field <IntGraphType>(
                "maxGold",
                "The full amount of gold to spend going to star's max level from the previous star's max level.",
                resolve: context => upgradeCostService.GetCosts(context.Source)?.MaxGold
                );

            Field <IntGraphType>(
                "minStones",
                "The minimum amount of stones to spend going to star's min level this from previous star min level (ex: from 6 to 7).",
                resolve: context => upgradeCostService.GetCosts(context.Source)?.MinStones
                );

            Field <IntGraphType>(
                "maxStones",
                "The full amount of stones to spend going to star's max level from the previous star's max level.",
                resolve: context => upgradeCostService.GetCosts(context.Source)?.MaxStones
                );

            Field <ListGraphType <HeroGraphType> >(
                "fodder",
                "All of the fodder heroes required to upgrade.",
                resolve: context => upgradeCostService.GetCosts(context.Source)?.Fodder
                );

            Field <StringGraphType>(
                "url",
                "The url for the hero's wiki entry.",
                resolve: context => context.Source.GetUrl()
                );

            Field <StringGraphType>(
                "img",
                "The url for the current hero's image.",
                resolve: context => context.Source.GetImg()
                );
        }
예제 #21
0
 public MigrateViewModel(IUpgradeService upgradeService)
 {
     Ensure.NotNull(upgradeService, "upgradeService");
     this.upgradeService = upgradeService;
 }
예제 #22
0
 public UpgradeController(IUpgradeService upgradeService)
 {
     _upgradeService = upgradeService;
 }
예제 #23
0
 public UpgradeMigrations(IContentManager contentManager, IUpgradeService upgradeService)
 {
     _contentManager = contentManager;
     _upgradeService = upgradeService;
 }
예제 #24
0
 public UpgradeMigrations(IUpgradeService upgradeService, ISiteService siteService)
 {
     _upgradeService = upgradeService;
     _siteService = siteService;
 }
 public static void AddRange(this IUpgradeService @this, IEnumerable <IUpgradeTask> tasks)
 {
     tasks.ForEach(@this.Add);
 }
예제 #26
0
 public UpgradeMigrations(IUpgradeService upgradeService, ISiteService siteService)
 {
     _upgradeService = upgradeService;
     _siteService    = siteService;
 }
 public UpgradeServiceController(IUpgradeService _upgradeSerciceRepo)
 {
     this.upgradeSerciceRepo = _upgradeSerciceRepo;
 }