Пример #1
0
        public bool SetState(string line)
        {
            //Parse Command Line args
            _commandArgs = new commandArgs();
            // migrate T381 T390
            var argsList  = line.Split(' ');
            var lineSplit = argsList.ToList().FindAll(s => !s.ToLower().Contains("setstores") && !string.IsNullOrEmpty(s)).ToList();

            if (lineSplit.Count != 3)
            {
                Console.WriteLine("usage migrate [From TitleId] [To TitleId]");
                _state = States.Complete;
                return(false);
            }
            _commandArgs.FromTitleId = lineSplit[1];
            _commandArgs.ToTitleId   = lineSplit[2];

            //SetUp Data Objects
            _titleData         = new TitleDataMigration();
            _titleInternalData = new TitleDataMigration();
            _currencyData      = new CurrencyDataMigration();
            _cloudScriptData   = new CloudScriptDataMigration();
            _cdnData           = new CdnFileDataMigration();
            _catalogData       = new CatalogDataMigration();
            _droptableData     = new DropTableDataMigration();
            _storeData         = new StoreDataMigration
            {
                StoreList = PlayFabService.Settings.StoreList
            };

            SetNextState();
            return(false);
        }
        public bool SetState(string line)
        {
            // Parse Command Line args
            _commandArgs = new CommandArgs();
            // migrate T381 T390
            var argsList = line.Split(' ');
            var lineSplit = argsList.ToList().FindAll(s => !s.ToLower().Contains("setstores") && !string.IsNullOrEmpty(s)).ToList();
            if (lineSplit.Count != 3)
            {
                Console.WriteLine("usage migrate [From TitleId] [To TitleId]");
                _state = States.Complete;
                return false;
            }
            _commandArgs.FromTitleId = lineSplit[1];
            _commandArgs.ToTitleId = lineSplit[2];

            // SetUp Data Objects
            _titleData = new TitleDataMigration();
            _currencyData = new CurrencyDataMigration();
            _cloudScriptData = new CloudScriptDataMigration();
            _cdnData = new CdnFileDataMigration();
            _catalogData = new CatalogDataMigration();
            _storeData = new StoreDataMigration
            {
                StoreList = PlayFabService.Settings.StoreList
            };

            SetNextState();
            return false;
        }