| 1 | #nullable enable |
| 2 | using Avalonia.Threading; |
| 3 | using CascadeIDE.Cockpit.DataBus; |
| 4 | using CascadeIDE.Contracts; |
| 5 | |
| 6 | namespace CascadeIDE.Features.SolutionWarmup.Application; |
| 7 | |
| 8 | [DataBusSubscriber("solution-warmup-his")] |
| 9 | [UiThreadMarshal("bus → IUiScheduler.Post Background")] |
| 10 | public static class SolutionWarmupStateBusSubscription |
| 11 | { |
| 12 | public static IDisposable Subscribe( |
| 13 | IDataBus dataBus, |
| 14 | IUiScheduler ui, |
| 15 | Action<SolutionWarmupStateChanged> apply) => |
| 16 | dataBus.Subscribe<SolutionWarmupStateChanged>(evt => |
| 17 | ui.Post(() => apply(evt), DispatcherPriority.Background)); |
| 18 | } |
| 19 | |
View only · write via MCP/CIDE