diff --git a/src/Agent/AutopilotMonitor.Agent.V2.Core/Orchestration/DefaultComponentFactory.cs b/src/Agent/AutopilotMonitor.Agent.V2.Core/Orchestration/DefaultComponentFactory.cs index 5a64b065..b79cc500 100644 --- a/src/Agent/AutopilotMonitor.Agent.V2.Core/Orchestration/DefaultComponentFactory.cs +++ b/src/Agent/AutopilotMonitor.Agent.V2.Core/Orchestration/DefaultComponentFactory.cs @@ -353,7 +353,7 @@ namespace AutopilotMonitor.Agent.V2.Core.Orchestration // RegNotifyChangeKeyValue, stop via Process.Exited. No idle polling. Constructed first so // the DO host can share its process-start signal and feed Office DO stats back to it. // Kill-switchable via remote config. - OfficeInstallDetectorHost officeHost = null; + OfficeInstallDetectorHost? officeHost = null; if (collectors.EnableOfficeInstallDetector) { officeHost = new OfficeInstallDetectorHost( @@ -380,7 +380,7 @@ namespace AutopilotMonitor.Agent.V2.Core.Orchestration intervalSeconds: collectors.DeliveryOptimizationIntervalSeconds, imeHost: _imeLogHost, officeProcessWatcher: officeHost?.ProcessWatcher, - onOfficeDoSample: officeHost != null ? officeHost.SubmitDoSample : (Action)null); + onOfficeDoSample: officeHost != null ? officeHost.SubmitDoSample : (Action?)null); hosts.Add(doHost); }