Example #1
0
        public int RunApplyOption(ApplyOption opts)
        {
            try
            {
                //run the migration
                var configuration    = SetupRunConfiguration(opts, isVerifyOnly: false);
                var migrationService = _migrationServiceFactory.Create(configuration.Platform);
                migrationService.Run();

                _traceService.Success($"Schema migration completed successfuly on {configuration.Workspace}.");
                return(0);
            }
            catch (Exception ex)
            {
                return(OnException(ex, "Failed to execute apply function", opts.IsDebug));
            }
        }
Example #2
0
        void    BatchApplyOption(ApplyOption ao)
        {
            var  childrens   = findwall.GetComponentsInChildren <FPointView>();
            bool bneedChange = false;

            foreach (var v in childrens)
            {
                if (ao(v, true))
                {
                    bneedChange = true;
                    break;
                }
            }
            if (bneedChange)
            {
                Undo.RecordObjects(childrens, "ApplyChildren");
                foreach (var v in childrens)
                {
                    ao(v, false);
                }
                Undo.FlushUndoRecordObjects();
            }
        }