protected void RegisterExpression(FirebirdProcessedExpressionBase fbExpression) { if (!FBOptions.UndoEnabled) { return; } if (!fbExpression.CanUndo) { RollbackTransaction(); throw new NotSupportedException(String.Format("Expression can't be undone: {0}", fbExpression.ToString())); } processedExpressions.Peek().Push(fbExpression); }
protected void RegisterExpression(FirebirdProcessedExpressionBase fbExpression) { if (!FBOptions.UndoEnabled || IsRunningOutOfMigrationScope()) { return; } if (!fbExpression.CanUndo) { RollbackTransaction(); throw new NotSupportedException(String.Format("Expression can't be undone: {0}", fbExpression.ToString())); } if (processedExpressions.Count == 0) { processedExpressions.Push(new Stack <FirebirdProcessedExpressionBase>()); } processedExpressions.Peek().Push(fbExpression); }