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)); } }
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(); } }