From f1ee3674151eb5e3b5865bad7622d961fcae4853 Mon Sep 17 00:00:00 2001 From: David Date: Tue, 17 Dec 2024 11:30:34 -0500 Subject: [PATCH] chore: Remove dead code --- .../HotReload/ServerHotReloadProcessor.cs | 33 ------------------- 1 file changed, 33 deletions(-) diff --git a/src/Uno.UI.RemoteControl.Server.Processors/HotReload/ServerHotReloadProcessor.cs b/src/Uno.UI.RemoteControl.Server.Processors/HotReload/ServerHotReloadProcessor.cs index 9a4cacaf5023..1d97bac73364 100644 --- a/src/Uno.UI.RemoteControl.Server.Processors/HotReload/ServerHotReloadProcessor.cs +++ b/src/Uno.UI.RemoteControl.Server.Processors/HotReload/ServerHotReloadProcessor.cs @@ -604,39 +604,6 @@ public void Dispose() } #region Helpers - private static IObservable> ToObservable(params FileSystemWatcher[] watchers) - => Observable.Defer(() => - { - // Create an observable instead of using the FromEventPattern which - // does not register to events properly. - // Renames are required for the WriteTemporary->DeleteOriginal->RenameToOriginal that - // Visual Studio uses to save files. - - var subject = new Subject(); - - void changed(object s, FileSystemEventArgs args) => subject.OnNext(args.FullPath); - void renamed(object s, RenamedEventArgs args) => subject.OnNext(args.FullPath); - - foreach (var watcher in watchers) - { - watcher.Changed += changed; - watcher.Created += changed; - watcher.Renamed += renamed; - } - - return subject - .Buffer(() => subject.Throttle(TimeSpan.FromMilliseconds(250))) // Wait for 250 ms without any file change - .Finally(() => - { - foreach (var watcher in watchers) - { - watcher.Changed -= changed; - watcher.Created -= changed; - watcher.Renamed -= renamed; - } - }); - }); - private static IObservable>> To2StepsObservable(FileSystemWatcher[] watchers, Predicate filter) => Observable.Create>>(o => {