Class DeferredActionGate
- Namespace
- Archiver.App.Core
- Assembly
- Archiver.App.Core.dll
Runs actions immediately once "opened," queues them (FIFO) beforehand. Backs MainWindow's "don't mutate FileItems before the root Grid's first Loaded/layout pass" fix (T-F106) — kept WinUI-free (mirrors FileActivationRouter's split) so the queue/flush logic itself is unit-testable even though the actual trigger (Loaded) isn't. Open() is idempotent — a second call is a no-op, not a re-flush.
public sealed class DeferredActionGate
- Inheritance
-
DeferredActionGate
- Inherited Members
Methods
Cancel()
Discards any queued actions without running them. Never re-opens a closed gate.
public void Cancel()
Open()
Opens the gate and flushes every queued action, in order. Idempotent.
public void Open()
RunOrDefer(Action)
Runs action now if open, otherwise queues it for the next Open().
public void RunOrDefer(Action action)
Parameters
actionAction