using SQLVision.Core.Enums; using SQLVision.Core.Models; namespace SQLVision.Core.Interfaces; public interface IScriptManager { Task> LoadScriptsAsync(string? directory = null); Task ReloadScriptAsync(string filePath); void WatchDirectory(string directory, Action onScriptChanged); event EventHandler ScriptChanged; event EventHandler ScriptsReloaded; } public class ScriptChangedEventArgs : EventArgs { public string FilePath { get; } public ScriptChangeType ChangeType { get; } public ScriptMetadata? Script { get; } public ScriptChangedEventArgs(string filePath, ScriptChangeType changeType, ScriptMetadata? script = null) { FilePath = filePath; ChangeType = changeType; Script = script; } } public class ScriptsReloadedEventArgs : EventArgs { public IEnumerable Scripts { get; } public ScriptsReloadedEventArgs(IEnumerable scripts) { Scripts = scripts; } }