fix: arm automation on post-netload command
This commit is contained in:
@@ -45,7 +45,13 @@ internal static class FirstLimitedApplyAutomationBootstrap
|
|||||||
// Public test command is intentionally side-effect free with respect to Plant APIs.
|
// Public test command is intentionally side-effect free with respect to Plant APIs.
|
||||||
internal static void Arm()
|
internal static void Arm()
|
||||||
{
|
{
|
||||||
if (state is BootstrapState.Prepared) state = BootstrapState.Armed;
|
if (state is BootstrapState.Prepared)
|
||||||
|
{
|
||||||
|
// The command itself is the post-NETLOAD barrier. The next Idle
|
||||||
|
// callback, not this command callback, is allowed to start work.
|
||||||
|
observedIdle = true;
|
||||||
|
state = BootstrapState.Armed;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void OnIdle(object? sender, EventArgs args)
|
private static void OnIdle(object? sender, EventArgs args)
|
||||||
|
|||||||
@@ -70,6 +70,7 @@ public sealed class FoundationTests
|
|||||||
Assert.DoesNotContain("PlantProject.LoadProject", bootstrap);
|
Assert.DoesNotContain("PlantProject.LoadProject", bootstrap);
|
||||||
Assert.DoesNotContain("MdiActiveDocument", bootstrap);
|
Assert.DoesNotContain("MdiActiveDocument", bootstrap);
|
||||||
Assert.Contains("AcadApplication.Idle += OnIdle", bootstrap);
|
Assert.Contains("AcadApplication.Idle += OnIdle", bootstrap);
|
||||||
|
Assert.Contains("observedIdle = true", bootstrap);
|
||||||
Assert.Contains("coordinatorStartCount++", bootstrap);
|
Assert.Contains("coordinatorStartCount++", bootstrap);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user