Add fully-injected MainWindowViewModel constructor
Introduce an injected constructor taking IHardwareMonitorService, ILogger, IRemoteWebServer (+ the concrete selection/plot/startup services) and IStartupTracer, with shared settings initialization. A transitional 2-arg constructor still builds the legacy graph for MainWindow until it is DI-resolved; an _ownsServices flag keeps disposal correct across both paths. Break the VM<->RemoteWebServer construction cycle by moving the root provider to RemoteWebServer.SetRootProvider (removing it from the constructor), and make RemoteWebServer.Quit idempotent. Update RemoteWebServer tests for the new ctor. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -24,6 +24,8 @@ public interface IRemoteWebServer : IDisposable
|
||||
|
||||
string UserName { get; set; }
|
||||
|
||||
void SetRootProvider(Func<ViewModels.SensorTreeItemViewModel?> rootProvider);
|
||||
|
||||
void SetPassword(string plainPassword);
|
||||
|
||||
bool Start();
|
||||
|
||||
Reference in New Issue
Block a user