Updated warnings documentation
This commit is contained in:
@@ -99,14 +99,15 @@ namespace xUnitRevitUtils
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Runs an Action in a Revit transaction, uses TaskCompletionSource to communicate when done
|
||||
/// </summary>
|
||||
/// <param name="action">Action to run</param>
|
||||
/// <param name="doc">Revit Document</param>
|
||||
/// <param name="transactionName">Transaction Name</param>
|
||||
/// <returns></returns>
|
||||
public static Task RunInTransaction(Action action, Document doc, string transactionName = "transaction", bool ignoreWarnings = false)
|
||||
/// <summary>
|
||||
/// Runs an Action in a Revit transaction, uses TaskCompletionSource to communicate when done
|
||||
/// </summary>
|
||||
/// <param name="action">Action to run</param>
|
||||
/// <param name="doc">Revit Document</param>
|
||||
/// <param name="transactionName">Transaction Name</param>
|
||||
/// <param name="ignoreWarnings">Enable to swallow all warnings generated by the transaction and prevent them from being raised within Revit</param>
|
||||
/// <returns></returns>
|
||||
public static Task RunInTransaction(Action action, Document doc, string transactionName = "transaction", bool ignoreWarnings = false)
|
||||
{
|
||||
var tcs = new TaskCompletionSource<string>();
|
||||
Queue.Add(new Action(() =>
|
||||
@@ -141,7 +142,10 @@ namespace xUnitRevitUtils
|
||||
|
||||
}
|
||||
|
||||
public class IgnoreAllWarnings : IFailuresPreprocessor
|
||||
/// <summary>
|
||||
/// A failures preprocesser that clears any failures that occur within a transaction
|
||||
/// </summary>
|
||||
internal class IgnoreAllWarnings : IFailuresPreprocessor
|
||||
{
|
||||
public FailureProcessingResult PreprocessFailures(FailuresAccessor failuresAccessor)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user