From 167a67abb53ea00fb0f3021d74450adfd9e89c98 Mon Sep 17 00:00:00 2001 From: Connor Ivy Date: Thu, 9 Mar 2023 16:36:35 -0600 Subject: [PATCH] We don't want to dispose the app and event handler --- xUnitRevitRunner/xUnitRevitRunnerShared/App.cs | 2 +- xUnitRevitRunner/xUnitRevitRunnerShared/Runner.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/xUnitRevitRunner/xUnitRevitRunnerShared/App.cs b/xUnitRevitRunner/xUnitRevitRunnerShared/App.cs index 6247912..02175c2 100644 --- a/xUnitRevitRunner/xUnitRevitRunnerShared/App.cs +++ b/xUnitRevitRunner/xUnitRevitRunnerShared/App.cs @@ -37,7 +37,7 @@ public Result OnStartup(UIControlledApplication a) private void ControlledApplication_ApplicationInitialized(object sender, Autodesk.Revit.DB.Events.ApplicationInitializedEventArgs e) { var app = sender as Application; - using var uiapp = new UIApplication(app); + var uiapp = new UIApplication(app); Runner.ReadConfig(); diff --git a/xUnitRevitRunner/xUnitRevitRunnerShared/Runner.cs b/xUnitRevitRunner/xUnitRevitRunnerShared/Runner.cs index a24fef1..64a71aa 100644 --- a/xUnitRevitRunner/xUnitRevitRunnerShared/Runner.cs +++ b/xUnitRevitRunner/xUnitRevitRunnerShared/Runner.cs @@ -23,7 +23,7 @@ internal static void Launch(UIApplication uiapp) try { var queue = new List(); - using var eventHandler = ExternalEvent.Create(new ExternalEventHandler(queue)); + var eventHandler = ExternalEvent.Create(new ExternalEventHandler(queue)); xru.Initialize(uiapp, SynchronizationContext.Current, eventHandler, queue);