hot reload
This commit is contained in:
@@ -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() { }
|
||||
}
|
||||
@@ -17,4 +17,6 @@ public interface IRecognitionControl
|
||||
event Action<SessionEndedEvent> SessionEnded;
|
||||
event Action<ErrorsInSequenceEvent> ErrorsInSequenceAlarm;
|
||||
|
||||
void HotReload();
|
||||
event Action RecipeFileChanged;
|
||||
}
|
||||
Reference in New Issue
Block a user