feat(S2-b): connect durable MQTT sync to capture workflow
This commit is contained in:
@@ -1,15 +1,18 @@
|
||||
using FieldLogger.Services;
|
||||
using FieldLogger.Services.Sync;
|
||||
|
||||
namespace FieldLogger;
|
||||
|
||||
public partial class App : Application
|
||||
{
|
||||
private readonly DeviceConnectionManager _connectionManager;
|
||||
private readonly IMqttSyncService _syncService;
|
||||
|
||||
public App(DeviceConnectionManager connectionManager)
|
||||
public App(DeviceConnectionManager connectionManager, IMqttSyncService syncService)
|
||||
{
|
||||
InitializeComponent();
|
||||
_connectionManager = connectionManager;
|
||||
_syncService = syncService;
|
||||
|
||||
Console.WriteLine("===== FIELD LOGGER APP STARTING =====");
|
||||
Console.WriteLine($"Console output is working! Time: {DateTime.Now:HH:mm:ss}");
|
||||
@@ -24,6 +27,7 @@ public partial class App : Application
|
||||
{
|
||||
Console.WriteLine("App: Window closing, disconnecting devices...");
|
||||
await DisconnectAllDevicesAsync();
|
||||
await _syncService.StopAsync();
|
||||
};
|
||||
|
||||
return window;
|
||||
@@ -54,4 +58,4 @@ public partial class App : Application
|
||||
Console.WriteLine($"App: Error disconnecting devices: {ex.Message}");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user