Improve Publisher

This commit is contained in:
TheXamlGuy
2024-05-14 19:24:07 +01:00
parent adb5ffe57a
commit 4ba58a9863
22 changed files with 93 additions and 140 deletions
+2 -2
View File
@@ -11,12 +11,12 @@ public class ConfigurationMonitor<TConfiguration>(IConfigurationFile<TConfigurat
public Task StartAsync(CancellationToken cancellationToken)
{
async void ChangedHandler(object sender,
void ChangedHandler(object sender,
FileSystemEventArgs args)
{
if (reader.Read() is { } configuration)
{
await publisher.PublishUI(new ChangedEventArgs<TConfiguration>(configuration));
publisher.PublishUI(new ChangedEventArgs<TConfiguration>(configuration));
}
}