feat(popout): wire pool + window render + sidebar pop-out routing
This commit is contained in:
@@ -164,3 +164,23 @@ internal sealed class CommandHelpWindowInitHostedService(
|
||||
|
||||
public Task StopAsync(CancellationToken cancellationToken) => Task.CompletedTask;
|
||||
}
|
||||
|
||||
// Attaches the singleton PayloadHandler to every pre-allocated pop-out
|
||||
// window's MessageList post-container-build. Pool/window cannot take the
|
||||
// PayloadHandler via ctor (that would close the silent FactoryCallSite cycle —
|
||||
// same §6.2 reason as MessageList.AttachPayloadHandler / CommandHelpWindow.
|
||||
// AttachMainWindow). Both singletons exist by host.StartAsync time.
|
||||
internal sealed class ChannelPopoutInitHostedService(
|
||||
ChannelPopoutPool pool,
|
||||
PayloadHandler payloadHandler
|
||||
) : IHostedService
|
||||
{
|
||||
public Task StartAsync(CancellationToken cancellationToken)
|
||||
{
|
||||
foreach (var window in pool.Instances)
|
||||
window.AttachPayloadHandler(payloadHandler);
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
|
||||
public Task StopAsync(CancellationToken cancellationToken) => Task.CompletedTask;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user