hot reload

This commit is contained in:
EugeneTes
2026-02-18 11:01:35 +01:00
parent 2bac7140a4
commit 14fe822962
9 changed files with 345 additions and 47 deletions

View File

@@ -142,6 +142,7 @@ public abstract class BaseRecognitionControl: IRecognitionControl
_cts?.Dispose();
_cts = null;
_loopTask = null;
Cleanup();
}
SessionEnded?.Invoke(new SessionEndedEvent
@@ -241,4 +242,9 @@ public abstract class BaseRecognitionControl: IRecognitionControl
public event Action<SessionStartedEvent> SessionStarted = delegate { };
public event Action<SessionEndedEvent> SessionEnded = delegate { };
public event Action<ErrorsInSequenceEvent> ErrorsInSequenceAlarm = delegate { };
public event Action RecipeFileChanged = delegate { };
public virtual void HotReload() { }
protected void RaiseRecipeFileChanged() => RecipeFileChanged?.Invoke();
protected virtual void Cleanup() { }
}

View File

@@ -17,4 +17,6 @@ public interface IRecognitionControl
event Action<SessionEndedEvent> SessionEnded;
event Action<ErrorsInSequenceEvent> ErrorsInSequenceAlarm;
void HotReload();
event Action RecipeFileChanged;
}