public static void commitTransaction(this Transaction transaction, WarningSwallower failuresPreprocessor) { FailureHandlingOptions failureOptions = transaction.GetFailureHandlingOptions(); failureOptions.SetFailuresPreprocessor(failuresPreprocessor); failureOptions.SetDelayedMiniWarnings(true); failureOptions.SetClearAfterRollback(true); transaction.SetFailureHandlingOptions(failureOptions); transaction.Commit(); }
public static void CommitTrans(this Transaction transaction, bool deleteWarning = true, bool deleteError = false) { WarningSwallower failuresPreprocessor = new WarningSwallower(deleteWarning, deleteError); transaction.commitTransaction(failuresPreprocessor); }