Добавьте файлы проекта.

This commit is contained in:
FrigaT
2026-01-05 00:29:19 +03:00
committed by FrigaT
parent 76a09d80d4
commit d0653c2098
105 changed files with 6729 additions and 0 deletions

View File

@@ -0,0 +1,38 @@
using SQLVision.Core.Enums;
using SQLVision.Core.Models;
namespace SQLVision.Core.Interfaces;
public interface IScriptManager
{
Task<IEnumerable<ScriptMetadata>> LoadScriptsAsync(string? directory = null);
Task<ScriptMetadata> ReloadScriptAsync(string filePath);
void WatchDirectory(string directory, Action<string> onScriptChanged);
event EventHandler<ScriptChangedEventArgs> ScriptChanged;
event EventHandler<ScriptsReloadedEventArgs> 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<ScriptMetadata> Scripts { get; }
public ScriptsReloadedEventArgs(IEnumerable<ScriptMetadata> scripts)
{
Scripts = scripts;
}
}